{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "b79ac6df",
   "metadata": {},
   "outputs": [],
   "source": [
    "import sys"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "e32cc0e4",
   "metadata": {},
   "outputs": [],
   "source": [
    "sys.path"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "e39cb08b",
   "metadata": {},
   "outputs": [],
   "source": [
    "sys.path.append(\"/Users/huangzhiming/Documents/python学习/packaging_tutorial/src\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "7f2cc5b6",
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['/Users/huangzhiming/Downloads',\n",
       " '/Users/huangzhiming/opt/anaconda3/lib/python39.zip',\n",
       " '/Users/huangzhiming/opt/anaconda3/lib/python3.9',\n",
       " '/Users/huangzhiming/opt/anaconda3/lib/python3.9/lib-dynload',\n",
       " '',\n",
       " '/Users/huangzhiming/opt/anaconda3/lib/python3.9/site-packages',\n",
       " '/Users/huangzhiming/opt/anaconda3/lib/python3.9/site-packages/aeosa',\n",
       " '/Users/huangzhiming/Documents/python学习/packaging_tutorial/src']"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sys.path"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "3c64e53a",
   "metadata": {},
   "outputs": [],
   "source": [
    "sys.path.insert(0,\"/Users/huangzhiming/Documents/python学习/sympy\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "ecb4cc1d",
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['/Users/huangzhiming/Documents/python学习/sympy',\n",
       " '/Users/huangzhiming/Downloads',\n",
       " '/Users/huangzhiming/opt/anaconda3/lib/python39.zip',\n",
       " '/Users/huangzhiming/opt/anaconda3/lib/python3.9',\n",
       " '/Users/huangzhiming/opt/anaconda3/lib/python3.9/lib-dynload',\n",
       " '',\n",
       " '/Users/huangzhiming/opt/anaconda3/lib/python3.9/site-packages',\n",
       " '/Users/huangzhiming/opt/anaconda3/lib/python3.9/site-packages/aeosa',\n",
       " '/Users/huangzhiming/Documents/python学习/packaging_tutorial/src']"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sys.path"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "a409cdbb",
   "metadata": {},
   "outputs": [],
   "source": [
    "%load_ext autoreload \n",
    "%autoreload 1\n",
    "\n",
    "%aimport function_calculator_package.extreme_points\n",
    "%aimport quadratic_function.quadraticfunction \n",
    "%aimport quadratic_function.hyperbola\n",
    "%aimport basic_package.utils\n",
    "\n",
    "from function_calculator_package.extreme_points import *\n",
    "from quadratic_function.quadraticfunction import QuadraticFunction\n",
    "from quadratic_function.hyperbola import Hyperbola\n",
    "from basic_package.utils import *"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 67,
   "id": "cabac83c",
   "metadata": {},
   "outputs": [],
   "source": [
    "%aimport basic_package.utils\n",
    "from basic_package.utils import *"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "b82e7482",
   "metadata": {},
   "outputs": [],
   "source": [
    "from sympy.core.symbol import _symbol"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "0b19a71d",
   "metadata": {
    "scrolled": false
   },
   "outputs": [],
   "source": [
    "%aimport quadratic_function.utils\n",
    "from quadratic_function.utils import *"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "bfe0f29d",
   "metadata": {},
   "outputs": [],
   "source": [
    "from sympy import *"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "3b074071",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<module 'sympy' from '/Users/huangzhiming/Documents/python学习/sympy/sympy/__init__.py'>"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sys.modules[\"sympy\"]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "0e91d22f",
   "metadata": {},
   "outputs": [],
   "source": [
    "from sympy.abc import x,y,z,t,k,l,n,m,p,q"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 138,
   "id": "2032bbf9",
   "metadata": {},
   "outputs": [],
   "source": [
    "from sympy.stats import FiniteRV, P, E, density"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "18782e5e",
   "metadata": {},
   "outputs": [],
   "source": [
    "a=Matrix([1,3,0])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "68215d9d",
   "metadata": {},
   "outputs": [],
   "source": [
    "b=Matrix([2,1,1])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "e707d761",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left[\\begin{matrix}5\\end{matrix}\\right]$"
      ],
      "text/plain": [
       "Matrix([[5]])"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a.T*b"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "51ecd29e",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\sqrt{6}$"
      ],
      "text/plain": [
       "sqrt(6)"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "b.norm(2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "0611ccb5",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left[\\begin{matrix}\\frac{5}{3}\\\\\\frac{5}{6}\\\\\\frac{5}{6}\\end{matrix}\\right]$"
      ],
      "text/plain": [
       "Matrix([\n",
       "[5/3],\n",
       "[5/6],\n",
       "[5/6]])"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "b*5/(6)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "45a0a2b5",
   "metadata": {},
   "outputs": [],
   "source": [
    "a=Matrix([1,1,x])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "3d6c5f71",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left[\\begin{matrix}1\\\\1\\\\x\\end{matrix}\\right]$"
      ],
      "text/plain": [
       "Matrix([\n",
       "[1],\n",
       "[1],\n",
       "[x]])"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "c4b7db99",
   "metadata": {},
   "outputs": [],
   "source": [
    "b=Matrix([-2,2,3])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "a9fa3d2c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left[\\begin{matrix}-2\\\\2\\\\3\\end{matrix}\\right]$"
      ],
      "text/plain": [
       "Matrix([\n",
       "[-2],\n",
       "[ 2],\n",
       "[ 3]])"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "b"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "id": "225ac329",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left[\\begin{matrix}6 x - 17\\end{matrix}\\right]$"
      ],
      "text/plain": [
       "Matrix([[6*x - 17]])"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "(2*a-b).T*b"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "id": "be0bf34c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left[\\begin{matrix}4\\\\0\\\\2 x - 3\\end{matrix}\\right]$"
      ],
      "text/plain": [
       "Matrix([\n",
       "[      4],\n",
       "[      0],\n",
       "[2*x - 3]])"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "2*a-b"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "id": "610460a2",
   "metadata": {},
   "outputs": [],
   "source": [
    "M=Point(1,-1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "id": "0e6d0261",
   "metadata": {},
   "outputs": [],
   "source": [
    "N=Point(2,2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "id": "4cbba6a4",
   "metadata": {},
   "outputs": [],
   "source": [
    "P=Point(3,0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "id": "f292a402",
   "metadata": {},
   "outputs": [],
   "source": [
    "Q=Point(x,y)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "id": "40f208e1",
   "metadata": {},
   "outputs": [],
   "source": [
    "PQ=Q-P"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "id": "848cd69f",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\operatorname{Point2D}\\left(x - 3, y\\right)$"
      ],
      "text/plain": [
       "Point2D(x - 3, y)"
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "PQ"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "id": "bffcec7e",
   "metadata": {},
   "outputs": [],
   "source": [
    "MN=N-M"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "id": "60278422",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left[\\begin{matrix}x + 3 y - 3\\end{matrix}\\right]$"
      ],
      "text/plain": [
       "Matrix([[x + 3*y - 3]])"
      ]
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "Matrix(MN).T*Matrix(PQ)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "id": "e5a9e725",
   "metadata": {},
   "outputs": [],
   "source": [
    "PN=N-P"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "id": "836943f1",
   "metadata": {},
   "outputs": [],
   "source": [
    "MQ=Q-M"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "id": "1b9db14f",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(2, 1)"
      ]
     },
     "execution_count": 35,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "Matrix(PN).shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "id": "202bf542",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left[\\begin{matrix}-1\\\\2\\\\0\\end{matrix}\\right]$"
      ],
      "text/plain": [
       "Matrix([\n",
       "[-1],\n",
       "[ 2],\n",
       "[ 0]])"
      ]
     },
     "execution_count": 43,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "Matrix([*list(PN),0])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "id": "1c9095b7",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left[\\begin{matrix}0\\\\0\\\\- 2 x - y + 1\\end{matrix}\\right]$"
      ],
      "text/plain": [
       "Matrix([\n",
       "[           0],\n",
       "[           0],\n",
       "[-2*x - y + 1]])"
      ]
     },
     "execution_count": 46,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "Matrix([*list(PN),0]).cross(Matrix([*list(MQ),0]))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "id": "e1e7cd6a",
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Help on function linsolve in module sympy.solvers.solveset:\n",
      "\n",
      "linsolve(system, *symbols)\n",
      "    Solve system of $N$ linear equations with $M$ variables; both\n",
      "    underdetermined and overdetermined systems are supported.\n",
      "    The possible number of solutions is zero, one or infinite.\n",
      "    Zero solutions throws a ValueError, whereas infinite\n",
      "    solutions are represented parametrically in terms of the given\n",
      "    symbols. For unique solution a :class:`~.FiniteSet` of ordered tuples\n",
      "    is returned.\n",
      "    \n",
      "    All standard input formats are supported:\n",
      "    For the given set of equations, the respective input types\n",
      "    are given below:\n",
      "    \n",
      "    .. math:: 3x + 2y -   z = 1\n",
      "    .. math:: 2x - 2y + 4z = -2\n",
      "    .. math:: 2x -   y + 2z = 0\n",
      "    \n",
      "    * Augmented matrix form, ``system`` given below:\n",
      "    \n",
      "    $$ \\text{system} = \\left[{array}{cccc}\n",
      "        3 &  2 & -1 &  1\\\\\n",
      "        2 & -2 &  4 & -2\\\\\n",
      "        2 & -1 &  2 &  0\n",
      "        \\end{array}\\right] $$\n",
      "    \n",
      "    ::\n",
      "    \n",
      "        system = Matrix([[3, 2, -1, 1], [2, -2, 4, -2], [2, -1, 2, 0]])\n",
      "    \n",
      "    * List of equations form\n",
      "    \n",
      "    ::\n",
      "    \n",
      "        system  =  [3x + 2y - z - 1, 2x - 2y + 4z + 2, 2x - y + 2z]\n",
      "    \n",
      "    * Input $A$ and $b$ in matrix form (from $Ax = b$) are given as:\n",
      "    \n",
      "    $$ A = \\left[\\begin{array}{ccc}\n",
      "        3 &  2 & -1 \\\\\n",
      "        2 & -2 &  4 \\\\\n",
      "        2 & -1 &  2\n",
      "        \\end{array}\\right] \\ \\  b = \\left[\\begin{array}{c}\n",
      "        1 \\\\ -2 \\\\ 0\n",
      "        \\end{array}\\right] $$\n",
      "    \n",
      "    ::\n",
      "    \n",
      "        A = Matrix([[3, 2, -1], [2, -2, 4], [2, -1, 2]])\n",
      "        b = Matrix([[1], [-2], [0]])\n",
      "        system = (A, b)\n",
      "    \n",
      "    Symbols can always be passed but are actually only needed\n",
      "    when 1) a system of equations is being passed and 2) the\n",
      "    system is passed as an underdetermined matrix and one wants\n",
      "    to control the name of the free variables in the result.\n",
      "    An error is raised if no symbols are used for case 1, but if\n",
      "    no symbols are provided for case 2, internally generated symbols\n",
      "    will be provided. When providing symbols for case 2, there should\n",
      "    be at least as many symbols are there are columns in matrix A.\n",
      "    \n",
      "    The algorithm used here is Gauss-Jordan elimination, which\n",
      "    results, after elimination, in a row echelon form matrix.\n",
      "    \n",
      "    Returns\n",
      "    =======\n",
      "    \n",
      "    A FiniteSet containing an ordered tuple of values for the\n",
      "    unknowns for which the `system` has a solution. (Wrapping\n",
      "    the tuple in FiniteSet is used to maintain a consistent\n",
      "    output format throughout solveset.)\n",
      "    \n",
      "    Returns EmptySet, if the linear system is inconsistent.\n",
      "    \n",
      "    Raises\n",
      "    ======\n",
      "    \n",
      "    ValueError\n",
      "        The input is not valid.\n",
      "        The symbols are not given.\n",
      "    \n",
      "    Examples\n",
      "    ========\n",
      "    \n",
      "    >>> from sympy import Matrix, linsolve, symbols\n",
      "    >>> x, y, z = symbols(\"x, y, z\")\n",
      "    >>> A = Matrix([[1, 2, 3], [4, 5, 6], [7, 8, 10]])\n",
      "    >>> b = Matrix([3, 6, 9])\n",
      "    >>> A\n",
      "    Matrix([\n",
      "    [1, 2,  3],\n",
      "    [4, 5,  6],\n",
      "    [7, 8, 10]])\n",
      "    >>> b\n",
      "    Matrix([\n",
      "    [3],\n",
      "    [6],\n",
      "    [9]])\n",
      "    >>> linsolve((A, b), [x, y, z])\n",
      "    {(-1, 2, 0)}\n",
      "    \n",
      "    * Parametric Solution: In case the system is underdetermined, the\n",
      "      function will return a parametric solution in terms of the given\n",
      "      symbols. Those that are free will be returned unchanged. e.g. in\n",
      "      the system below, `z` is returned as the solution for variable z;\n",
      "      it can take on any value.\n",
      "    \n",
      "    >>> A = Matrix([[1, 2, 3], [4, 5, 6], [7, 8, 9]])\n",
      "    >>> b = Matrix([3, 6, 9])\n",
      "    >>> linsolve((A, b), x, y, z)\n",
      "    {(z - 1, 2 - 2*z, z)}\n",
      "    \n",
      "    If no symbols are given, internally generated symbols will be used.\n",
      "    The ``tau0`` in the third position indicates (as before) that the third\n",
      "    variable -- whatever it is named -- can take on any value:\n",
      "    \n",
      "    >>> linsolve((A, b))\n",
      "    {(tau0 - 1, 2 - 2*tau0, tau0)}\n",
      "    \n",
      "    * List of equations as input\n",
      "    \n",
      "    >>> Eqns = [3*x + 2*y - z - 1, 2*x - 2*y + 4*z + 2, - x + y/2 - z]\n",
      "    >>> linsolve(Eqns, x, y, z)\n",
      "    {(1, -2, -2)}\n",
      "    \n",
      "    * Augmented matrix as input\n",
      "    \n",
      "    >>> aug = Matrix([[2, 1, 3, 1], [2, 6, 8, 3], [6, 8, 18, 5]])\n",
      "    >>> aug\n",
      "    Matrix([\n",
      "    [2, 1,  3, 1],\n",
      "    [2, 6,  8, 3],\n",
      "    [6, 8, 18, 5]])\n",
      "    >>> linsolve(aug, x, y, z)\n",
      "    {(3/10, 2/5, 0)}\n",
      "    \n",
      "    * Solve for symbolic coefficients\n",
      "    \n",
      "    >>> a, b, c, d, e, f = symbols('a, b, c, d, e, f')\n",
      "    >>> eqns = [a*x + b*y - c, d*x + e*y - f]\n",
      "    >>> linsolve(eqns, x, y)\n",
      "    {((-b*f + c*e)/(a*e - b*d), (a*f - c*d)/(a*e - b*d))}\n",
      "    \n",
      "    * A degenerate system returns solution as set of given\n",
      "      symbols.\n",
      "    \n",
      "    >>> system = Matrix(([0, 0, 0], [0, 0, 0], [0, 0, 0]))\n",
      "    >>> linsolve(system, x, y)\n",
      "    {(x, y)}\n",
      "    \n",
      "    * For an empty system linsolve returns empty set\n",
      "    \n",
      "    >>> linsolve([], x)\n",
      "    EmptySet\n",
      "    \n",
      "    * An error is raised if, after expansion, any nonlinearity\n",
      "      is detected:\n",
      "    \n",
      "    >>> linsolve([x*(1/x - 1), (y - 1)**2 - y**2 + 1], x, y)\n",
      "    {(1, 1)}\n",
      "    >>> linsolve([x**2 - 1], x)\n",
      "    Traceback (most recent call last):\n",
      "    ...\n",
      "    NonlinearError:\n",
      "    nonlinear term encountered: x**2\n",
      "\n"
     ]
    }
   ],
   "source": [
    "help(linsolve)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 48,
   "id": "d12b44ab",
   "metadata": {},
   "outputs": [],
   "source": [
    "solve_A=Matrix([[1,3],[-2,-1]])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 49,
   "id": "7d4cae52",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left[\\begin{matrix}1 & 3\\\\-2 & -1\\end{matrix}\\right]$"
      ],
      "text/plain": [
       "Matrix([\n",
       "[ 1,  3],\n",
       "[-2, -1]])"
      ]
     },
     "execution_count": 49,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "solve_A"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 50,
   "id": "8da2b417",
   "metadata": {},
   "outputs": [],
   "source": [
    "solve_b=Matrix([3,-1])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 51,
   "id": "ffd16a65",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left[\\begin{matrix}3\\\\-1\\end{matrix}\\right]$"
      ],
      "text/plain": [
       "Matrix([\n",
       "[ 3],\n",
       "[-1]])"
      ]
     },
     "execution_count": 51,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "solve_b"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "id": "fa8e08e0",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left\\{\\left( 0, \\  1\\right)\\right\\}$"
      ],
      "text/plain": [
       "{(0, 1)}"
      ]
     },
     "execution_count": 52,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "linsolve((solve_A,solve_b),[x,y])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 54,
   "id": "4e679347",
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "ename": "NameError",
     "evalue": "name 'Angle' is not defined",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mNameError\u001b[0m                                 Traceback (most recent call last)",
      "Cell \u001b[0;32mIn[54], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m help(\u001b[43mAngle\u001b[49m)\n",
      "\u001b[0;31mNameError\u001b[0m: name 'Angle' is not defined"
     ]
    }
   ],
   "source": [
    "help(Angle)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 56,
   "id": "de1eebfb",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\sqrt{5}$"
      ],
      "text/plain": [
       "sqrt(5)"
      ]
     },
     "execution_count": 56,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "N.distance(P)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 58,
   "id": "535cb47e",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left(2 - x\\right)^{2} + \\left(2 - y\\right)^{2} = 5$"
      ],
      "text/plain": [
       "Eq((2 - x)**2 + (2 - y)**2, 5)"
      ]
     },
     "execution_count": 58,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "Eq((N.distance(Q))**2,(N.distance(P))**2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 59,
   "id": "41125511",
   "metadata": {},
   "outputs": [],
   "source": [
    "c=Circle(_)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 60,
   "id": "e602a598",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\operatorname{Point2D}\\left(2, 2\\right)$"
      ],
      "text/plain": [
       "Point2D(2, 2)"
      ]
     },
     "execution_count": 60,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "c.center"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 63,
   "id": "e3888025",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left(x - 2\\right)^{2} - 1$"
      ],
      "text/plain": [
       "(x - 2)**2 - 1"
      ]
     },
     "execution_count": 63,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "c.equation(x,y).subs(y,0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 64,
   "id": "3f13fffb",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left\\{1, 3\\right\\}$"
      ],
      "text/plain": [
       "{1, 3}"
      ]
     },
     "execution_count": 64,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "solveset(_,x,Reals)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 66,
   "id": "4d340c15",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle m$"
      ],
      "text/plain": [
       "m"
      ]
     },
     "execution_count": 66,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "m"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 67,
   "id": "da6493c9",
   "metadata": {},
   "outputs": [],
   "source": [
    "l1=Line((3+m)*x+4*y-(5-3*m))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 69,
   "id": "dbffa4f4",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\frac{3 m}{4} + x \\left(\\frac{m}{4} + \\frac{3}{4}\\right) + y - \\frac{5}{4}$"
      ],
      "text/plain": [
       "3*m/4 + x*(m/4 + 3/4) + y - 5/4"
      ]
     },
     "execution_count": 69,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "l1.equation()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 70,
   "id": "e636a13c",
   "metadata": {},
   "outputs": [],
   "source": [
    "l2=Line(2*x+(5+m)*y-8)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 71,
   "id": "3985bfd8",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\frac{2 x}{m + 5} + y - \\frac{8}{m + 5}$"
      ],
      "text/plain": [
       "2*x/(m + 5) + y - 8/(m + 5)"
      ]
     },
     "execution_count": 71,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "l2.equation()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 72,
   "id": "0434c629",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left\\{\\left( \\frac{- 3 m - 7}{m + 7}, \\  \\frac{14}{m + 7}\\right)\\right\\}$"
      ],
      "text/plain": [
       "{((-3*m - 7)/(m + 7), 14/(m + 7))}"
      ]
     },
     "execution_count": 72,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "linsolve([l1.equation(x,y),l2.equation(x,y)],[x,y])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 73,
   "id": "99b66a6b",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle - \\frac{m}{4} - \\frac{3}{4}$"
      ],
      "text/plain": [
       "-m/4 - 3/4"
      ]
     },
     "execution_count": 73,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "l1.slope"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 74,
   "id": "ea6654be",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle - \\frac{2}{m + 5}$"
      ],
      "text/plain": [
       "-2/(m + 5)"
      ]
     },
     "execution_count": 74,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "l2.slope"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 75,
   "id": "98c1e4dd",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left\\{-7, -1\\right\\}$"
      ],
      "text/plain": [
       "{-7, -1}"
      ]
     },
     "execution_count": 75,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "solveset(l1.slope-l2.slope,m,Reals)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 77,
   "id": "0e8415b2",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\frac{x}{2} + y - 2$"
      ],
      "text/plain": [
       "x/2 + y - 2"
      ]
     },
     "execution_count": 77,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "l1.equation().subs(m,-1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 78,
   "id": "cdad5254",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\frac{x}{2} + y - 2$"
      ],
      "text/plain": [
       "x/2 + y - 2"
      ]
     },
     "execution_count": 78,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "l2.equation().subs(m,-1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 80,
   "id": "d76614dc",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left\\{- \\frac{13}{3}\\right\\}$"
      ],
      "text/plain": [
       "{-13/3}"
      ]
     },
     "execution_count": 80,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "solveset(l1.slope*l2.slope+1,m,Reals)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 81,
   "id": "d6447528",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle - \\frac{1}{2}$"
      ],
      "text/plain": [
       "-1/2"
      ]
     },
     "execution_count": 81,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "Line(x+2*y+1).slope"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 82,
   "id": "71e53b68",
   "metadata": {},
   "outputs": [],
   "source": [
    "theta=atan(2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 83,
   "id": "a19cf7f8",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\operatorname{atan}{\\left(2 \\right)}$"
      ],
      "text/plain": [
       "atan(2)"
      ]
     },
     "execution_count": 83,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "theta"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 84,
   "id": "e8af978b",
   "metadata": {},
   "outputs": [],
   "source": [
    "expr= sin(x)*sin(x+3*pi/2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 85,
   "id": "c90b7c35",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle - \\sin{\\left(x \\right)} \\cos{\\left(x \\right)}$"
      ],
      "text/plain": [
       "-sin(x)*cos(x)"
      ]
     },
     "execution_count": 85,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "expr"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 86,
   "id": "050e76f0",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle - \\frac{2}{5}$"
      ],
      "text/plain": [
       "-2/5"
      ]
     },
     "execution_count": 86,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "expr.subs(x,theta)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 87,
   "id": "37464b39",
   "metadata": {},
   "outputs": [],
   "source": [
    "l1=Line(-2*x+4-y)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 88,
   "id": "94f649e5",
   "metadata": {},
   "outputs": [],
   "source": [
    "l2=Line(y-k*x)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 90,
   "id": "560ab8c8",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\operatorname{Point2D}\\left(\\frac{4}{k + 2}, \\frac{4 k}{k + 2}\\right)$"
      ],
      "text/plain": [
       "Point2D(4/(k + 2), 4*k/(k + 2))"
      ]
     },
     "execution_count": 90,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "list(Intersection(l1,l2))[0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 91,
   "id": "95ef887c",
   "metadata": {},
   "outputs": [],
   "source": [
    "l3=Line(y-x-2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 92,
   "id": "5a460d69",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\frac{4 k}{k + 2} - 2 - \\frac{4}{k + 2}$"
      ],
      "text/plain": [
       "4*k/(k + 2) - 2 - 4/(k + 2)"
      ]
     },
     "execution_count": 92,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "l3.equation(x,y).subs(dict(zip((x,y),list(Intersection(l1,l2))[0])))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 93,
   "id": "aa1b6dc7",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left\\{4\\right\\}$"
      ],
      "text/plain": [
       "{4}"
      ]
     },
     "execution_count": 93,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "solveset(_,k,Reals)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 94,
   "id": "5bf60760",
   "metadata": {},
   "outputs": [],
   "source": [
    "O=Point(0,0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 95,
   "id": "e5f00478",
   "metadata": {},
   "outputs": [],
   "source": [
    "l1=Line(x+m*y-2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 96,
   "id": "46354218",
   "metadata": {},
   "outputs": [],
   "source": [
    "l2=Line(m*x-y+2*m)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 101,
   "id": "58f74fa5",
   "metadata": {},
   "outputs": [],
   "source": [
    "P=list(Intersection(l1,l2))[0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 102,
   "id": "c9313fc7",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\operatorname{Point2D}\\left(\\frac{2 \\cdot \\left(1 - m^{2}\\right)}{m^{2} + 1}, \\frac{4 m}{m^{2} + 1}\\right)$"
      ],
      "text/plain": [
       "Point2D(2*(1 - m**2)/(m**2 + 1), 4*m/(m**2 + 1))"
      ]
     },
     "execution_count": 102,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "P"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 103,
   "id": "6d8b17d1",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\sqrt{\\frac{16 m^{2}}{\\left(m^{2} + 1\\right)^{2}} + \\frac{4 \\left(1 - m^{2}\\right)^{2}}{\\left(m^{2} + 1\\right)^{2}}}$"
      ],
      "text/plain": [
       "sqrt(16*m**2/(m**2 + 1)**2 + 4*(1 - m**2)**2/(m**2 + 1)**2)"
      ]
     },
     "execution_count": 103,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "O.distance(P)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 104,
   "id": "7969fed0",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle 2$"
      ],
      "text/plain": [
       "2"
      ]
     },
     "execution_count": 104,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "simplify(_)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 105,
   "id": "fe20df0c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 105,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "Point(2,0) in l1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 106,
   "id": "db84e02a",
   "metadata": {},
   "outputs": [],
   "source": [
    "c1=Circle(Point(3,0),3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 108,
   "id": "6a0bb6ad",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle x^{2} - 6 x + y^{2}$"
      ],
      "text/plain": [
       "x**2 - 6*x + y**2"
      ]
     },
     "execution_count": 108,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "expand(c1.equation())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 109,
   "id": "06fb65f8",
   "metadata": {},
   "outputs": [],
   "source": [
    "c2=Circle(x**2+y**2+8*y+m)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 110,
   "id": "87cb3051",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\operatorname{Circle}\\left(\\operatorname{Point2D}\\left(0, -4\\right), \\sqrt{16 - m}\\right)$"
      ],
      "text/plain": [
       "Circle(Point2D(0, -4), sqrt(16 - m))"
      ]
     },
     "execution_count": 110,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "c2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 111,
   "id": "3d56ec7b",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/svg+xml": [
       "<svg xmlns=\"http://www.w3.org/2000/svg\"\n",
       "            xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n",
       "            width=\"100.0\" height=\"100.0\" viewBox=\"-0.600000000000000 -3.60000000000000 7.20000000000000 7.20000000000000\"\n",
       "            preserveAspectRatio=\"xMinYMin meet\">\n",
       "            <defs>\n",
       "                <marker id=\"markerCircle\" markerWidth=\"8\" markerHeight=\"8\"\n",
       "                    refx=\"5\" refy=\"5\" markerUnits=\"strokeWidth\">\n",
       "                    <circle cx=\"5\" cy=\"5\" r=\"1.5\" style=\"stroke: none; fill:#000000;\"/>\n",
       "                </marker>\n",
       "                <marker id=\"markerArrow\" markerWidth=\"13\" markerHeight=\"13\" refx=\"2\" refy=\"4\"\n",
       "                       orient=\"auto\" markerUnits=\"strokeWidth\">\n",
       "                    <path d=\"M2,2 L2,6 L6,4\" style=\"fill: #000000;\" />\n",
       "                </marker>\n",
       "                <marker id=\"markerReverseArrow\" markerWidth=\"13\" markerHeight=\"13\" refx=\"6\" refy=\"4\"\n",
       "                       orient=\"auto\" markerUnits=\"strokeWidth\">\n",
       "                    <path d=\"M6,2 L6,6 L2,4\" style=\"fill: #000000;\" />\n",
       "                </marker>\n",
       "            </defs><g transform=\"matrix(1,0,0,-1,0,0)\"><ellipse fill=\"#66cc99\" stroke=\"#555555\" stroke-width=\"0.144000000000000\" opacity=\"0.6\" cx=\"3.00000000000000\" cy=\"0\" rx=\"3.00000000000000\" ry=\"3.00000000000000\"/></g></svg>"
      ],
      "text/latex": [
       "$\\displaystyle \\operatorname{Circle}\\left(\\operatorname{Point2D}\\left(3, 0\\right), 3\\right)$"
      ],
      "text/plain": [
       "Circle(Point2D(3, 0), 3)"
      ]
     },
     "execution_count": 111,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "c1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 113,
   "id": "b428b948",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle 5$"
      ],
      "text/plain": [
       "5"
      ]
     },
     "execution_count": 113,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "c1.center.distance(c2.center)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 117,
   "id": "a2a0ef8c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left(-3, 1\\right)$"
      ],
      "text/plain": [
       "Interval.open(-3, 1)"
      ]
     },
     "execution_count": 117,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "solve_univariate_inequalities([5-k>3+k,3+k>0],k,Reals)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 118,
   "id": "d73c85e4",
   "metadata": {},
   "outputs": [],
   "source": [
    "A=Point(7/S(2),4)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 119,
   "id": "eb04a231",
   "metadata": {},
   "outputs": [],
   "source": [
    "para=Parabola(Point(S(1)/2,0),Line(x+S(1)/2))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 120,
   "id": "8f78aa53",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle 2 x - y^{2}$"
      ],
      "text/plain": [
       "2*x - y**2"
      ]
     },
     "execution_count": 120,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "para.equation()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 143,
   "id": "1d43de33",
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "ename": "NotImplementedError",
     "evalue": "",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mNotImplementedError\u001b[0m                       Traceback (most recent call last)",
      "Cell \u001b[0;32mIn[143], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[43mA\u001b[49m\u001b[43m \u001b[49m\u001b[38;5;129;43;01min\u001b[39;49;00m\u001b[43m \u001b[49m\u001b[43mpara\u001b[49m\n",
      "File \u001b[0;32m~/opt/anaconda3/lib/python3.9/site-packages/sympy/geometry/entity.py:111\u001b[0m, in \u001b[0;36mGeometryEntity.__contains__\u001b[0;34m(self, other)\u001b[0m\n\u001b[1;32m    109\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m \u001b[38;5;28mtype\u001b[39m(\u001b[38;5;28mself\u001b[39m) \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;28mtype\u001b[39m(other):\n\u001b[1;32m    110\u001b[0m     \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[38;5;28mself\u001b[39m \u001b[38;5;241m==\u001b[39m other\n\u001b[0;32m--> 111\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mNotImplementedError\u001b[39;00m()\n",
      "\u001b[0;31mNotImplementedError\u001b[0m: "
     ]
    }
   ],
   "source": [
    "A in para"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 146,
   "id": "3282c5d1",
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Help on class Triangle in module sympy.geometry.polygon:\n",
      "\n",
      "class Triangle(Polygon)\n",
      " |  Triangle(*args, **kwargs)\n",
      " |  \n",
      " |  A polygon with three vertices and three sides.\n",
      " |  \n",
      " |  Parameters\n",
      " |  ==========\n",
      " |  \n",
      " |  points : sequence of Points\n",
      " |  keyword: asa, sas, or sss to specify sides/angles of the triangle\n",
      " |  \n",
      " |  Attributes\n",
      " |  ==========\n",
      " |  \n",
      " |  vertices\n",
      " |  altitudes\n",
      " |  orthocenter\n",
      " |  circumcenter\n",
      " |  circumradius\n",
      " |  circumcircle\n",
      " |  inradius\n",
      " |  incircle\n",
      " |  exradii\n",
      " |  medians\n",
      " |  medial\n",
      " |  nine_point_circle\n",
      " |  \n",
      " |  Raises\n",
      " |  ======\n",
      " |  \n",
      " |  GeometryError\n",
      " |      If the number of vertices is not equal to three, or one of the vertices\n",
      " |      is not a Point, or a valid keyword is not given.\n",
      " |  \n",
      " |  See Also\n",
      " |  ========\n",
      " |  \n",
      " |  sympy.geometry.point.Point, Polygon\n",
      " |  \n",
      " |  Examples\n",
      " |  ========\n",
      " |  \n",
      " |  >>> from sympy import Triangle, Point\n",
      " |  >>> Triangle(Point(0, 0), Point(4, 0), Point(4, 3))\n",
      " |  Triangle(Point2D(0, 0), Point2D(4, 0), Point2D(4, 3))\n",
      " |  \n",
      " |  Keywords sss, sas, or asa can be used to give the desired\n",
      " |  side lengths (in order) and interior angles (in degrees) that\n",
      " |  define the triangle:\n",
      " |  \n",
      " |  >>> Triangle(sss=(3, 4, 5))\n",
      " |  Triangle(Point2D(0, 0), Point2D(3, 0), Point2D(3, 4))\n",
      " |  >>> Triangle(asa=(30, 1, 30))\n",
      " |  Triangle(Point2D(0, 0), Point2D(1, 0), Point2D(1/2, sqrt(3)/6))\n",
      " |  >>> Triangle(sas=(1, 45, 2))\n",
      " |  Triangle(Point2D(0, 0), Point2D(2, 0), Point2D(sqrt(2)/2, sqrt(2)/2))\n",
      " |  \n",
      " |  Method resolution order:\n",
      " |      Triangle\n",
      " |      Polygon\n",
      " |      sympy.geometry.entity.GeometrySet\n",
      " |      sympy.geometry.entity.GeometryEntity\n",
      " |      sympy.sets.sets.Set\n",
      " |      sympy.core.basic.Basic\n",
      " |      sympy.printing.defaults.Printable\n",
      " |      sympy.core.evalf.EvalfMixin\n",
      " |      builtins.object\n",
      " |  \n",
      " |  Methods defined here:\n",
      " |  \n",
      " |  bisectors(self)\n",
      " |      The angle bisectors of the triangle.\n",
      " |      \n",
      " |      An angle bisector of a triangle is a straight line through a vertex\n",
      " |      which cuts the corresponding angle in half.\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      bisectors : dict\n",
      " |          Each key is a vertex (Point) and each value is the corresponding\n",
      " |          bisector (Segment).\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      sympy.geometry.point.Point, sympy.geometry.line.Segment\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Point, Triangle, Segment\n",
      " |      >>> p1, p2, p3 = Point(0, 0), Point(1, 0), Point(0, 1)\n",
      " |      >>> t = Triangle(p1, p2, p3)\n",
      " |      >>> from sympy import sqrt\n",
      " |      >>> t.bisectors()[p2] == Segment(Point(1, 0), Point(0, sqrt(2) - 1))\n",
      " |      True\n",
      " |  \n",
      " |  is_equilateral(self)\n",
      " |      Are all the sides the same length?\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      is_equilateral : boolean\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      sympy.geometry.entity.GeometryEntity.is_similar, RegularPolygon\n",
      " |      is_isosceles, is_right, is_scalene\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Triangle, Point\n",
      " |      >>> t1 = Triangle(Point(0, 0), Point(4, 0), Point(4, 3))\n",
      " |      >>> t1.is_equilateral()\n",
      " |      False\n",
      " |      \n",
      " |      >>> from sympy import sqrt\n",
      " |      >>> t2 = Triangle(Point(0, 0), Point(10, 0), Point(5, 5*sqrt(3)))\n",
      " |      >>> t2.is_equilateral()\n",
      " |      True\n",
      " |  \n",
      " |  is_isosceles(self)\n",
      " |      Are two or more of the sides the same length?\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      is_isosceles : boolean\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      is_equilateral, is_right, is_scalene\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Triangle, Point\n",
      " |      >>> t1 = Triangle(Point(0, 0), Point(4, 0), Point(2, 4))\n",
      " |      >>> t1.is_isosceles()\n",
      " |      True\n",
      " |  \n",
      " |  is_right(self)\n",
      " |      Is the triangle right-angled.\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      is_right : boolean\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      sympy.geometry.line.LinearEntity.is_perpendicular\n",
      " |      is_equilateral, is_isosceles, is_scalene\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Triangle, Point\n",
      " |      >>> t1 = Triangle(Point(0, 0), Point(4, 0), Point(4, 3))\n",
      " |      >>> t1.is_right()\n",
      " |      True\n",
      " |  \n",
      " |  is_scalene(self)\n",
      " |      Are all the sides of the triangle of different lengths?\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      is_scalene : boolean\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      is_equilateral, is_isosceles, is_right\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Triangle, Point\n",
      " |      >>> t1 = Triangle(Point(0, 0), Point(4, 0), Point(1, 4))\n",
      " |      >>> t1.is_scalene()\n",
      " |      True\n",
      " |  \n",
      " |  is_similar(t1, t2)\n",
      " |      Is another triangle similar to this one.\n",
      " |      \n",
      " |      Two triangles are similar if one can be uniformly scaled to the other.\n",
      " |      \n",
      " |      Parameters\n",
      " |      ==========\n",
      " |      \n",
      " |      other: Triangle\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      is_similar : boolean\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      sympy.geometry.entity.GeometryEntity.is_similar\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Triangle, Point\n",
      " |      >>> t1 = Triangle(Point(0, 0), Point(4, 0), Point(4, 3))\n",
      " |      >>> t2 = Triangle(Point(0, 0), Point(-4, 0), Point(-4, -3))\n",
      " |      >>> t1.is_similar(t2)\n",
      " |      True\n",
      " |      \n",
      " |      >>> t2 = Triangle(Point(0, 0), Point(-4, 0), Point(-4, -4))\n",
      " |      >>> t1.is_similar(t2)\n",
      " |      False\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Static methods defined here:\n",
      " |  \n",
      " |  __new__(cls, *args, **kwargs)\n",
      " |      Create and return a new object.  See help(type) for accurate signature.\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Readonly properties defined here:\n",
      " |  \n",
      " |  __sympy__\n",
      " |  \n",
      " |  altitudes\n",
      " |      The altitudes of the triangle.\n",
      " |      \n",
      " |      An altitude of a triangle is a segment through a vertex,\n",
      " |      perpendicular to the opposite side, with length being the\n",
      " |      height of the vertex measured from the line containing the side.\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      altitudes : dict\n",
      " |          The dictionary consists of keys which are vertices and values\n",
      " |          which are Segments.\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      sympy.geometry.point.Point, sympy.geometry.line.Segment.length\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Point, Triangle\n",
      " |      >>> p1, p2, p3 = Point(0, 0), Point(1, 0), Point(0, 1)\n",
      " |      >>> t = Triangle(p1, p2, p3)\n",
      " |      >>> t.altitudes[p1]\n",
      " |      Segment2D(Point2D(0, 0), Point2D(1/2, 1/2))\n",
      " |  \n",
      " |  circumcenter\n",
      " |      The circumcenter of the triangle\n",
      " |      \n",
      " |      The circumcenter is the center of the circumcircle.\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      circumcenter : Point\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      sympy.geometry.point.Point\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Point, Triangle\n",
      " |      >>> p1, p2, p3 = Point(0, 0), Point(1, 0), Point(0, 1)\n",
      " |      >>> t = Triangle(p1, p2, p3)\n",
      " |      >>> t.circumcenter\n",
      " |      Point2D(1/2, 1/2)\n",
      " |  \n",
      " |  circumcircle\n",
      " |      The circle which passes through the three vertices of the triangle.\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      circumcircle : Circle\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      sympy.geometry.ellipse.Circle\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Point, Triangle\n",
      " |      >>> p1, p2, p3 = Point(0, 0), Point(1, 0), Point(0, 1)\n",
      " |      >>> t = Triangle(p1, p2, p3)\n",
      " |      >>> t.circumcircle\n",
      " |      Circle(Point2D(1/2, 1/2), sqrt(2)/2)\n",
      " |  \n",
      " |  circumradius\n",
      " |      The radius of the circumcircle of the triangle.\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      circumradius : number of Basic instance\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      sympy.geometry.ellipse.Circle.radius\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Symbol\n",
      " |      >>> from sympy import Point, Triangle\n",
      " |      >>> a = Symbol('a')\n",
      " |      >>> p1, p2, p3 = Point(0, 0), Point(1, 0), Point(0, a)\n",
      " |      >>> t = Triangle(p1, p2, p3)\n",
      " |      >>> t.circumradius\n",
      " |      sqrt(a**2/4 + 1/4)\n",
      " |  \n",
      " |  eulerline\n",
      " |      The Euler line of the triangle.\n",
      " |      \n",
      " |      The line which passes through circumcenter, centroid and orthocenter.\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      eulerline : Line (or Point for equilateral triangles in which case all\n",
      " |                  centers coincide)\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Point, Triangle\n",
      " |      >>> p1, p2, p3 = Point(0, 0), Point(1, 0), Point(0, 1)\n",
      " |      >>> t = Triangle(p1, p2, p3)\n",
      " |      >>> t.eulerline\n",
      " |      Line2D(Point2D(0, 0), Point2D(1/2, 1/2))\n",
      " |  \n",
      " |  excenters\n",
      " |      Excenters of the triangle.\n",
      " |      \n",
      " |      An excenter is the center of a circle that is tangent to a side of the\n",
      " |      triangle and the extensions of the other two sides.\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      excenters : dict\n",
      " |      \n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      The excenters are keyed to the side of the triangle to which their corresponding\n",
      " |      excircle is tangent: The center is keyed, e.g. the excenter of a circle touching\n",
      " |      side 0 is:\n",
      " |      \n",
      " |      >>> from sympy import Point, Triangle\n",
      " |      >>> p1, p2, p3 = Point(0, 0), Point(6, 0), Point(0, 2)\n",
      " |      >>> t = Triangle(p1, p2, p3)\n",
      " |      >>> t.excenters[t.sides[0]]\n",
      " |      Point2D(12*sqrt(10), 2/3 + sqrt(10)/3)\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      sympy.geometry.polygon.Triangle.exradii\n",
      " |      \n",
      " |      References\n",
      " |      ==========\n",
      " |      \n",
      " |      .. [1] http://mathworld.wolfram.com/Excircles.html\n",
      " |  \n",
      " |  exradii\n",
      " |      The radius of excircles of a triangle.\n",
      " |      \n",
      " |      An excircle of the triangle is a circle lying outside the triangle,\n",
      " |      tangent to one of its sides and tangent to the extensions of the\n",
      " |      other two.\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      exradii : dict\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      sympy.geometry.polygon.Triangle.inradius\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      The exradius touches the side of the triangle to which it is keyed, e.g.\n",
      " |      the exradius touching side 2 is:\n",
      " |      \n",
      " |      >>> from sympy import Point, Triangle\n",
      " |      >>> p1, p2, p3 = Point(0, 0), Point(6, 0), Point(0, 2)\n",
      " |      >>> t = Triangle(p1, p2, p3)\n",
      " |      >>> t.exradii[t.sides[2]]\n",
      " |      -2 + sqrt(10)\n",
      " |      \n",
      " |      References\n",
      " |      ==========\n",
      " |      \n",
      " |      .. [1] http://mathworld.wolfram.com/Exradius.html\n",
      " |      .. [2] http://mathworld.wolfram.com/Excircles.html\n",
      " |  \n",
      " |  incenter\n",
      " |      The center of the incircle.\n",
      " |      \n",
      " |      The incircle is the circle which lies inside the triangle and touches\n",
      " |      all three sides.\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      incenter : Point\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      incircle, sympy.geometry.point.Point\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Point, Triangle\n",
      " |      >>> p1, p2, p3 = Point(0, 0), Point(1, 0), Point(0, 1)\n",
      " |      >>> t = Triangle(p1, p2, p3)\n",
      " |      >>> t.incenter\n",
      " |      Point2D(1 - sqrt(2)/2, 1 - sqrt(2)/2)\n",
      " |  \n",
      " |  incircle\n",
      " |      The incircle of the triangle.\n",
      " |      \n",
      " |      The incircle is the circle which lies inside the triangle and touches\n",
      " |      all three sides.\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      incircle : Circle\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      sympy.geometry.ellipse.Circle\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Point, Triangle\n",
      " |      >>> p1, p2, p3 = Point(0, 0), Point(2, 0), Point(0, 2)\n",
      " |      >>> t = Triangle(p1, p2, p3)\n",
      " |      >>> t.incircle\n",
      " |      Circle(Point2D(2 - sqrt(2), 2 - sqrt(2)), 2 - sqrt(2))\n",
      " |  \n",
      " |  inradius\n",
      " |      The radius of the incircle.\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      inradius : number of Basic instance\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      incircle, sympy.geometry.ellipse.Circle.radius\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Point, Triangle\n",
      " |      >>> p1, p2, p3 = Point(0, 0), Point(4, 0), Point(0, 3)\n",
      " |      >>> t = Triangle(p1, p2, p3)\n",
      " |      >>> t.inradius\n",
      " |      1\n",
      " |  \n",
      " |  medial\n",
      " |      The medial triangle of the triangle.\n",
      " |      \n",
      " |      The triangle which is formed from the midpoints of the three sides.\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      medial : Triangle\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      sympy.geometry.line.Segment.midpoint\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Point, Triangle\n",
      " |      >>> p1, p2, p3 = Point(0, 0), Point(1, 0), Point(0, 1)\n",
      " |      >>> t = Triangle(p1, p2, p3)\n",
      " |      >>> t.medial\n",
      " |      Triangle(Point2D(1/2, 0), Point2D(1/2, 1/2), Point2D(0, 1/2))\n",
      " |  \n",
      " |  medians\n",
      " |      The medians of the triangle.\n",
      " |      \n",
      " |      A median of a triangle is a straight line through a vertex and the\n",
      " |      midpoint of the opposite side, and divides the triangle into two\n",
      " |      equal areas.\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      medians : dict\n",
      " |          Each key is a vertex (Point) and each value is the median (Segment)\n",
      " |          at that point.\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      sympy.geometry.point.Point.midpoint, sympy.geometry.line.Segment.midpoint\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Point, Triangle\n",
      " |      >>> p1, p2, p3 = Point(0, 0), Point(1, 0), Point(0, 1)\n",
      " |      >>> t = Triangle(p1, p2, p3)\n",
      " |      >>> t.medians[p1]\n",
      " |      Segment2D(Point2D(0, 0), Point2D(1/2, 1/2))\n",
      " |  \n",
      " |  nine_point_circle\n",
      " |      The nine-point circle of the triangle.\n",
      " |      \n",
      " |      Nine-point circle is the circumcircle of the medial triangle, which\n",
      " |      passes through the feet of altitudes and the middle points of segments\n",
      " |      connecting the vertices and the orthocenter.\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      nine_point_circle : Circle\n",
      " |      \n",
      " |      See also\n",
      " |      ========\n",
      " |      \n",
      " |      sympy.geometry.line.Segment.midpoint\n",
      " |      sympy.geometry.polygon.Triangle.medial\n",
      " |      sympy.geometry.polygon.Triangle.orthocenter\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Point, Triangle\n",
      " |      >>> p1, p2, p3 = Point(0, 0), Point(1, 0), Point(0, 1)\n",
      " |      >>> t = Triangle(p1, p2, p3)\n",
      " |      >>> t.nine_point_circle\n",
      " |      Circle(Point2D(1/4, 1/4), sqrt(2)/4)\n",
      " |  \n",
      " |  orthocenter\n",
      " |      The orthocenter of the triangle.\n",
      " |      \n",
      " |      The orthocenter is the intersection of the altitudes of a triangle.\n",
      " |      It may lie inside, outside or on the triangle.\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      orthocenter : Point\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      sympy.geometry.point.Point\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Point, Triangle\n",
      " |      >>> p1, p2, p3 = Point(0, 0), Point(1, 0), Point(0, 1)\n",
      " |      >>> t = Triangle(p1, p2, p3)\n",
      " |      >>> t.orthocenter\n",
      " |      Point2D(0, 0)\n",
      " |  \n",
      " |  vertices\n",
      " |      The triangle's vertices\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      vertices : tuple\n",
      " |          Each element in the tuple is a Point\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      sympy.geometry.point.Point\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Triangle, Point\n",
      " |      >>> t = Triangle(Point(0, 0), Point(4, 0), Point(4, 3))\n",
      " |      >>> t.vertices\n",
      " |      (Point2D(0, 0), Point2D(4, 0), Point2D(4, 3))\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Data descriptors defined here:\n",
      " |  \n",
      " |  __dict__\n",
      " |      dictionary for instance variables (if defined)\n",
      " |  \n",
      " |  __weakref__\n",
      " |      list of weak references to the object (if defined)\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Data and other attributes defined here:\n",
      " |  \n",
      " |  default_assumptions = {}\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Methods inherited from Polygon:\n",
      " |  \n",
      " |  __contains__(self, o)\n",
      " |      Return True if o is contained within the boundary lines of self.altitudes\n",
      " |      \n",
      " |      Parameters\n",
      " |      ==========\n",
      " |      \n",
      " |      other : GeometryEntity\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      contained in : bool\n",
      " |          The points (and sides, if applicable) are contained in self.\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      sympy.geometry.entity.GeometryEntity.encloses\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Line, Segment, Point\n",
      " |      >>> p = Point(0, 0)\n",
      " |      >>> q = Point(1, 1)\n",
      " |      >>> s = Segment(p, q*2)\n",
      " |      >>> l = Line(p, q)\n",
      " |      >>> p in q\n",
      " |      False\n",
      " |      >>> p in s\n",
      " |      True\n",
      " |      >>> q*3 in s\n",
      " |      False\n",
      " |      >>> s in l\n",
      " |      True\n",
      " |  \n",
      " |  arbitrary_point(self, parameter='t')\n",
      " |      A parameterized point on the polygon.\n",
      " |      \n",
      " |      The parameter, varying from 0 to 1, assigns points to the position on\n",
      " |      the perimeter that is that fraction of the total perimeter. So the\n",
      " |      point evaluated at t=1/2 would return the point from the first vertex\n",
      " |      that is 1/2 way around the polygon.\n",
      " |      \n",
      " |      Parameters\n",
      " |      ==========\n",
      " |      \n",
      " |      parameter : str, optional\n",
      " |          Default value is 't'.\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      arbitrary_point : Point\n",
      " |      \n",
      " |      Raises\n",
      " |      ======\n",
      " |      \n",
      " |      ValueError\n",
      " |          When `parameter` already appears in the Polygon's definition.\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      sympy.geometry.point.Point\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Polygon, Symbol\n",
      " |      >>> t = Symbol('t', real=True)\n",
      " |      >>> tri = Polygon((0, 0), (1, 0), (1, 1))\n",
      " |      >>> p = tri.arbitrary_point('t')\n",
      " |      >>> perimeter = tri.perimeter\n",
      " |      >>> s1, s2 = [s.length for s in tri.sides[:2]]\n",
      " |      >>> p.subs(t, (s1 + s2/2)/perimeter)\n",
      " |      Point2D(1, 1/2)\n",
      " |  \n",
      " |  cut_section(self, line)\n",
      " |      Returns a tuple of two polygon segments that lie above and below\n",
      " |      the intersecting line respectively.\n",
      " |      \n",
      " |      Parameters\n",
      " |      ==========\n",
      " |      \n",
      " |      line: Line object of geometry module\n",
      " |          line which cuts the Polygon. The part of the Polygon that lies\n",
      " |          above and below this line is returned.\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      upper_polygon, lower_polygon: Polygon objects or None\n",
      " |          upper_polygon is the polygon that lies above the given line.\n",
      " |          lower_polygon is the polygon that lies below the given line.\n",
      " |          upper_polygon and lower polygon are ``None`` when no polygon\n",
      " |          exists above the line or below the line.\n",
      " |      \n",
      " |      Raises\n",
      " |      ======\n",
      " |      \n",
      " |      ValueError: When the line does not intersect the polygon\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Polygon, Line\n",
      " |      >>> a, b = 20, 10\n",
      " |      >>> p1, p2, p3, p4 = [(0, b), (0, 0), (a, 0), (a, b)]\n",
      " |      >>> rectangle = Polygon(p1, p2, p3, p4)\n",
      " |      >>> t = rectangle.cut_section(Line((0, 5), slope=0))\n",
      " |      >>> t\n",
      " |      (Polygon(Point2D(0, 10), Point2D(0, 5), Point2D(20, 5), Point2D(20, 10)),\n",
      " |      Polygon(Point2D(0, 5), Point2D(0, 0), Point2D(20, 0), Point2D(20, 5)))\n",
      " |      >>> upper_segment, lower_segment = t\n",
      " |      >>> upper_segment.area\n",
      " |      100\n",
      " |      >>> upper_segment.centroid\n",
      " |      Point2D(10, 15/2)\n",
      " |      >>> lower_segment.centroid\n",
      " |      Point2D(10, 5/2)\n",
      " |      \n",
      " |      References\n",
      " |      ==========\n",
      " |      \n",
      " |      .. [1] https://github.com/sympy/sympy/wiki/A-method-to-return-a-cut-section-of-any-polygon-geometry\n",
      " |  \n",
      " |  distance(self, o)\n",
      " |      Returns the shortest distance between self and o.\n",
      " |      \n",
      " |      If o is a point, then self does not need to be convex.\n",
      " |      If o is another polygon self and o must be convex.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Point, Polygon, RegularPolygon\n",
      " |      >>> p1, p2 = map(Point, [(0, 0), (7, 5)])\n",
      " |      >>> poly = Polygon(*RegularPolygon(p1, 1, 3).vertices)\n",
      " |      >>> poly.distance(p2)\n",
      " |      sqrt(61)\n",
      " |  \n",
      " |  encloses_point(self, p)\n",
      " |      Return True if p is enclosed by (is inside of) self.\n",
      " |      \n",
      " |      Notes\n",
      " |      =====\n",
      " |      \n",
      " |      Being on the border of self is considered False.\n",
      " |      \n",
      " |      Parameters\n",
      " |      ==========\n",
      " |      \n",
      " |      p : Point\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      encloses_point : True, False or None\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      sympy.geometry.point.Point, sympy.geometry.ellipse.Ellipse.encloses_point\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Polygon, Point\n",
      " |      >>> p = Polygon((0, 0), (4, 0), (4, 4))\n",
      " |      >>> p.encloses_point(Point(2, 1))\n",
      " |      True\n",
      " |      >>> p.encloses_point(Point(2, 2))\n",
      " |      False\n",
      " |      >>> p.encloses_point(Point(5, 5))\n",
      " |      False\n",
      " |      \n",
      " |      References\n",
      " |      ==========\n",
      " |      \n",
      " |      .. [1] http://paulbourke.net/geometry/polygonmesh/#insidepoly\n",
      " |  \n",
      " |  first_moment_of_area(self, point=None)\n",
      " |      Returns the first moment of area of a two-dimensional polygon with\n",
      " |      respect to a certain point of interest.\n",
      " |      \n",
      " |      First moment of area is a measure of the distribution of the area\n",
      " |      of a polygon in relation to an axis. The first moment of area of\n",
      " |      the entire polygon about its own centroid is always zero. Therefore,\n",
      " |      here it is calculated for an area, above or below a certain point\n",
      " |      of interest, that makes up a smaller portion of the polygon. This\n",
      " |      area is bounded by the point of interest and the extreme end\n",
      " |      (top or bottom) of the polygon. The first moment for this area is\n",
      " |      is then determined about the centroidal axis of the initial polygon.\n",
      " |      \n",
      " |      References\n",
      " |      ==========\n",
      " |      \n",
      " |      .. [1] https://skyciv.com/docs/tutorials/section-tutorials/calculating-the-statical-or-first-moment-of-area-of-beam-sections/?cc=BMD\n",
      " |      .. [2] https://mechanicalc.com/reference/cross-sections\n",
      " |      \n",
      " |      Parameters\n",
      " |      ==========\n",
      " |      \n",
      " |      point: Point, two-tuple of sympifyable objects, or None (default=None)\n",
      " |          point is the point above or below which the area of interest lies\n",
      " |          If ``point=None`` then the centroid acts as the point of interest.\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      Q_x, Q_y: number or SymPy expressions\n",
      " |          Q_x is the first moment of area about the x-axis\n",
      " |          Q_y is the first moment of area about the y-axis\n",
      " |          A negative sign indicates that the section modulus is\n",
      " |          determined for a section below (or left of) the centroidal axis\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Point, Polygon\n",
      " |      >>> a, b = 50, 10\n",
      " |      >>> p1, p2, p3, p4 = [(0, b), (0, 0), (a, 0), (a, b)]\n",
      " |      >>> p = Polygon(p1, p2, p3, p4)\n",
      " |      >>> p.first_moment_of_area()\n",
      " |      (625, 3125)\n",
      " |      >>> p.first_moment_of_area(point=Point(30, 7))\n",
      " |      (525, 3000)\n",
      " |  \n",
      " |  intersection(self, o)\n",
      " |      The intersection of polygon and geometry entity.\n",
      " |      \n",
      " |      The intersection may be empty and can contain individual Points and\n",
      " |      complete Line Segments.\n",
      " |      \n",
      " |      Parameters\n",
      " |      ==========\n",
      " |      \n",
      " |      other: GeometryEntity\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      intersection : list\n",
      " |          The list of Segments and Points\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      sympy.geometry.point.Point, sympy.geometry.line.Segment\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Point, Polygon, Line\n",
      " |      >>> p1, p2, p3, p4 = map(Point, [(0, 0), (1, 0), (5, 1), (0, 1)])\n",
      " |      >>> poly1 = Polygon(p1, p2, p3, p4)\n",
      " |      >>> p5, p6, p7 = map(Point, [(3, 2), (1, -1), (0, 2)])\n",
      " |      >>> poly2 = Polygon(p5, p6, p7)\n",
      " |      >>> poly1.intersection(poly2)\n",
      " |      [Point2D(1/3, 1), Point2D(2/3, 0), Point2D(9/5, 1/5), Point2D(7/3, 1)]\n",
      " |      >>> poly1.intersection(Line(p1, p2))\n",
      " |      [Segment2D(Point2D(0, 0), Point2D(1, 0))]\n",
      " |      >>> poly1.intersection(p1)\n",
      " |      [Point2D(0, 0)]\n",
      " |  \n",
      " |  is_convex(self)\n",
      " |      Is the polygon convex?\n",
      " |      \n",
      " |      A polygon is convex if all its interior angles are less than 180\n",
      " |      degrees and there are no intersections between sides.\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      is_convex : boolean\n",
      " |          True if this polygon is convex, False otherwise.\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      sympy.geometry.util.convex_hull\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Point, Polygon\n",
      " |      >>> p1, p2, p3, p4 = map(Point, [(0, 0), (1, 0), (5, 1), (0, 1)])\n",
      " |      >>> poly = Polygon(p1, p2, p3, p4)\n",
      " |      >>> poly.is_convex()\n",
      " |      True\n",
      " |  \n",
      " |  parameter_value(self, other, t)\n",
      " |      Return the parameter corresponding to the given point.\n",
      " |      Evaluating an arbitrary point of the entity at this parameter\n",
      " |      value will return the given point.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Line, Point\n",
      " |      >>> from sympy.abc import t\n",
      " |      >>> a = Point(0, 0)\n",
      " |      >>> b = Point(2, 2)\n",
      " |      >>> Line(a, b).parameter_value((1, 1), t)\n",
      " |      {t: 1/2}\n",
      " |      >>> Line(a, b).arbitrary_point(t).subs(_)\n",
      " |      Point2D(1, 1)\n",
      " |  \n",
      " |  plot_interval(self, parameter='t')\n",
      " |      The plot interval for the default geometric plot of the polygon.\n",
      " |      \n",
      " |      Parameters\n",
      " |      ==========\n",
      " |      \n",
      " |      parameter : str, optional\n",
      " |          Default value is 't'.\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      plot_interval : list (plot interval)\n",
      " |          [parameter, lower_bound, upper_bound]\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Polygon\n",
      " |      >>> p = Polygon((0, 0), (1, 0), (1, 1))\n",
      " |      >>> p.plot_interval()\n",
      " |      [t, 0, 1]\n",
      " |  \n",
      " |  polar_second_moment_of_area(self)\n",
      " |      Returns the polar modulus of a two-dimensional polygon\n",
      " |      \n",
      " |      It is a constituent of the second moment of area, linked through\n",
      " |      the perpendicular axis theorem. While the planar second moment of\n",
      " |      area describes an object's resistance to deflection (bending) when\n",
      " |      subjected to a force applied to a plane parallel to the central\n",
      " |      axis, the polar second moment of area describes an object's\n",
      " |      resistance to deflection when subjected to a moment applied in a\n",
      " |      plane perpendicular to the object's central axis (i.e. parallel to\n",
      " |      the cross-section)\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Polygon, symbols\n",
      " |      >>> a, b = symbols('a, b')\n",
      " |      >>> rectangle = Polygon((0, 0), (a, 0), (a, b), (0, b))\n",
      " |      >>> rectangle.polar_second_moment_of_area()\n",
      " |      a**3*b/12 + a*b**3/12\n",
      " |      \n",
      " |      References\n",
      " |      ==========\n",
      " |      \n",
      " |      .. [1] https://en.wikipedia.org/wiki/Polar_moment_of_inertia\n",
      " |  \n",
      " |  second_moment_of_area(self, point=None)\n",
      " |      Returns the second moment and product moment of area of a two dimensional polygon.\n",
      " |      \n",
      " |      Parameters\n",
      " |      ==========\n",
      " |      \n",
      " |      point : Point, two-tuple of sympifyable objects, or None(default=None)\n",
      " |          point is the point about which second moment of area is to be found.\n",
      " |          If \"point=None\" it will be calculated about the axis passing through the\n",
      " |          centroid of the polygon.\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      I_xx, I_yy, I_xy : number or SymPy expression\n",
      " |                         I_xx, I_yy are second moment of area of a two dimensional polygon.\n",
      " |                         I_xy is product moment of area of a two dimensional polygon.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Polygon, symbols\n",
      " |      >>> a, b = symbols('a, b')\n",
      " |      >>> p1, p2, p3, p4, p5 = [(0, 0), (a, 0), (a, b), (0, b), (a/3, b/3)]\n",
      " |      >>> rectangle = Polygon(p1, p2, p3, p4)\n",
      " |      >>> rectangle.second_moment_of_area()\n",
      " |      (a*b**3/12, a**3*b/12, 0)\n",
      " |      >>> rectangle.second_moment_of_area(p5)\n",
      " |      (a*b**3/9, a**3*b/9, a**2*b**2/36)\n",
      " |      \n",
      " |      References\n",
      " |      ==========\n",
      " |      \n",
      " |      .. [1] https://en.wikipedia.org/wiki/Second_moment_of_area\n",
      " |  \n",
      " |  section_modulus(self, point=None)\n",
      " |      Returns a tuple with the section modulus of a two-dimensional\n",
      " |      polygon.\n",
      " |      \n",
      " |      Section modulus is a geometric property of a polygon defined as the\n",
      " |      ratio of second moment of area to the distance of the extreme end of\n",
      " |      the polygon from the centroidal axis.\n",
      " |      \n",
      " |      Parameters\n",
      " |      ==========\n",
      " |      \n",
      " |      point : Point, two-tuple of sympifyable objects, or None(default=None)\n",
      " |          point is the point at which section modulus is to be found.\n",
      " |          If \"point=None\" it will be calculated for the point farthest from the\n",
      " |          centroidal axis of the polygon.\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      S_x, S_y: numbers or SymPy expressions\n",
      " |                S_x is the section modulus with respect to the x-axis\n",
      " |                S_y is the section modulus with respect to the y-axis\n",
      " |                A negative sign indicates that the section modulus is\n",
      " |                determined for a point below the centroidal axis\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import symbols, Polygon, Point\n",
      " |      >>> a, b = symbols('a, b', positive=True)\n",
      " |      >>> rectangle = Polygon((0, 0), (a, 0), (a, b), (0, b))\n",
      " |      >>> rectangle.section_modulus()\n",
      " |      (a*b**2/6, a**2*b/6)\n",
      " |      >>> rectangle.section_modulus(Point(a/4, b/4))\n",
      " |      (-a*b**2/3, -a**2*b/3)\n",
      " |      \n",
      " |      References\n",
      " |      ==========\n",
      " |      \n",
      " |      .. [1] https://en.wikipedia.org/wiki/Section_modulus\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Readonly properties inherited from Polygon:\n",
      " |  \n",
      " |  ambient_dimension\n",
      " |      What is the dimension of the space that the object is contained in?\n",
      " |  \n",
      " |  angles\n",
      " |      The internal angle at each vertex.\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      angles : dict\n",
      " |          A dictionary where each key is a vertex and each value is the\n",
      " |          internal angle at that vertex. The vertices are represented as\n",
      " |          Points.\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      sympy.geometry.point.Point, sympy.geometry.line.LinearEntity.angle_between\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Point, Polygon\n",
      " |      >>> p1, p2, p3, p4 = map(Point, [(0, 0), (1, 0), (5, 1), (0, 1)])\n",
      " |      >>> poly = Polygon(p1, p2, p3, p4)\n",
      " |      >>> poly.angles[p1]\n",
      " |      pi/2\n",
      " |      >>> poly.angles[p2]\n",
      " |      acos(-4*sqrt(17)/17)\n",
      " |  \n",
      " |  area\n",
      " |      The area of the polygon.\n",
      " |      \n",
      " |      Notes\n",
      " |      =====\n",
      " |      \n",
      " |      The area calculation can be positive or negative based on the\n",
      " |      orientation of the points. If any side of the polygon crosses\n",
      " |      any other side, there will be areas having opposite signs.\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      sympy.geometry.ellipse.Ellipse.area\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Point, Polygon\n",
      " |      >>> p1, p2, p3, p4 = map(Point, [(0, 0), (1, 0), (5, 1), (0, 1)])\n",
      " |      >>> poly = Polygon(p1, p2, p3, p4)\n",
      " |      >>> poly.area\n",
      " |      3\n",
      " |      \n",
      " |      In the Z shaped polygon (with the lower right connecting back\n",
      " |      to the upper left) the areas cancel out:\n",
      " |      \n",
      " |      >>> Z = Polygon((0, 1), (1, 1), (0, 0), (1, 0))\n",
      " |      >>> Z.area\n",
      " |      0\n",
      " |      \n",
      " |      In the M shaped polygon, areas do not cancel because no side\n",
      " |      crosses any other (though there is a point of contact).\n",
      " |      \n",
      " |      >>> M = Polygon((0, 0), (0, 1), (2, 0), (3, 1), (3, 0))\n",
      " |      >>> M.area\n",
      " |      -3/2\n",
      " |  \n",
      " |  bounds\n",
      " |      Return a tuple (xmin, ymin, xmax, ymax) representing the bounding\n",
      " |      rectangle for the geometric figure.\n",
      " |  \n",
      " |  centroid\n",
      " |      The centroid of the polygon.\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      centroid : Point\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      sympy.geometry.point.Point, sympy.geometry.util.centroid\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Point, Polygon\n",
      " |      >>> p1, p2, p3, p4 = map(Point, [(0, 0), (1, 0), (5, 1), (0, 1)])\n",
      " |      >>> poly = Polygon(p1, p2, p3, p4)\n",
      " |      >>> poly.centroid\n",
      " |      Point2D(31/18, 11/18)\n",
      " |  \n",
      " |  perimeter\n",
      " |      The perimeter of the polygon.\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      perimeter : number or Basic instance\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      sympy.geometry.line.Segment.length\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Point, Polygon\n",
      " |      >>> p1, p2, p3, p4 = map(Point, [(0, 0), (1, 0), (5, 1), (0, 1)])\n",
      " |      >>> poly = Polygon(p1, p2, p3, p4)\n",
      " |      >>> poly.perimeter\n",
      " |      sqrt(17) + 7\n",
      " |  \n",
      " |  sides\n",
      " |      The directed line segments that form the sides of the polygon.\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      sides : list of sides\n",
      " |          Each side is a directed Segment.\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      sympy.geometry.point.Point, sympy.geometry.line.Segment\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Point, Polygon\n",
      " |      >>> p1, p2, p3, p4 = map(Point, [(0, 0), (1, 0), (5, 1), (0, 1)])\n",
      " |      >>> poly = Polygon(p1, p2, p3, p4)\n",
      " |      >>> poly.sides\n",
      " |      [Segment2D(Point2D(0, 0), Point2D(1, 0)),\n",
      " |      Segment2D(Point2D(1, 0), Point2D(5, 1)),\n",
      " |      Segment2D(Point2D(5, 1), Point2D(0, 1)), Segment2D(Point2D(0, 1), Point2D(0, 0))]\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Methods inherited from sympy.geometry.entity.GeometryEntity:\n",
      " |  \n",
      " |  __cmp__(self, other)\n",
      " |      Comparison of two GeometryEntities.\n",
      " |  \n",
      " |  __getnewargs__(self)\n",
      " |      Returns a tuple that will be passed to __new__ on unpickling.\n",
      " |  \n",
      " |  __ne__(self, o)\n",
      " |      Test inequality of two geometrical entities.\n",
      " |  \n",
      " |  __radd__(self, a)\n",
      " |      Implementation of reverse add method.\n",
      " |  \n",
      " |  __repr__(self)\n",
      " |      String representation of a GeometryEntity that can be evaluated\n",
      " |      by sympy.\n",
      " |  \n",
      " |  __rmul__(self, a)\n",
      " |      Implementation of reverse multiplication method.\n",
      " |  \n",
      " |  __rsub__(self, a)\n",
      " |      Implementation of reverse subtraction method.\n",
      " |  \n",
      " |  __rtruediv__(self, a)\n",
      " |      Implementation of reverse division method.\n",
      " |  \n",
      " |  __str__(self)\n",
      " |      String representation of a GeometryEntity.\n",
      " |  \n",
      " |  encloses(self, o)\n",
      " |      Return True if o is inside (not on or outside) the boundaries of self.\n",
      " |      \n",
      " |      The object will be decomposed into Points and individual Entities need\n",
      " |      only define an encloses_point method for their class.\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      sympy.geometry.ellipse.Ellipse.encloses_point\n",
      " |      sympy.geometry.polygon.Polygon.encloses_point\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import RegularPolygon, Point, Polygon\n",
      " |      >>> t  = Polygon(*RegularPolygon(Point(0, 0), 1, 3).vertices)\n",
      " |      >>> t2 = Polygon(*RegularPolygon(Point(0, 0), 2, 3).vertices)\n",
      " |      >>> t2.encloses(t)\n",
      " |      True\n",
      " |      >>> t.encloses(t2)\n",
      " |      False\n",
      " |  \n",
      " |  equals(self, o)\n",
      " |  \n",
      " |  reflect(self, line)\n",
      " |      Reflects an object across a line.\n",
      " |      \n",
      " |      Parameters\n",
      " |      ==========\n",
      " |      \n",
      " |      line: Line\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import pi, sqrt, Line, RegularPolygon\n",
      " |      >>> l = Line((0, pi), slope=sqrt(2))\n",
      " |      >>> pent = RegularPolygon((1, 2), 1, 5)\n",
      " |      >>> rpent = pent.reflect(l)\n",
      " |      >>> rpent\n",
      " |      RegularPolygon(Point2D(-2*sqrt(2)*pi/3 - 1/3 + 4*sqrt(2)/3, 2/3 + 2*sqrt(2)/3 + 2*pi/3), -1, 5, -atan(2*sqrt(2)) + 3*pi/5)\n",
      " |      \n",
      " |      >>> from sympy import pi, Line, Circle, Point\n",
      " |      >>> l = Line((0, pi), slope=1)\n",
      " |      >>> circ = Circle(Point(0, 0), 5)\n",
      " |      >>> rcirc = circ.reflect(l)\n",
      " |      >>> rcirc\n",
      " |      Circle(Point2D(-pi, pi), -5)\n",
      " |  \n",
      " |  rotate(self, angle, pt=None)\n",
      " |      Rotate ``angle`` radians counterclockwise about Point ``pt``.\n",
      " |      \n",
      " |      The default pt is the origin, Point(0, 0)\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      scale, translate\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Point, RegularPolygon, Polygon, pi\n",
      " |      >>> t = Polygon(*RegularPolygon(Point(0, 0), 1, 3).vertices)\n",
      " |      >>> t # vertex on x axis\n",
      " |      Triangle(Point2D(1, 0), Point2D(-1/2, sqrt(3)/2), Point2D(-1/2, -sqrt(3)/2))\n",
      " |      >>> t.rotate(pi/2) # vertex on y axis now\n",
      " |      Triangle(Point2D(0, 1), Point2D(-sqrt(3)/2, -1/2), Point2D(sqrt(3)/2, -1/2))\n",
      " |  \n",
      " |  scale(self, x=1, y=1, pt=None)\n",
      " |      Scale the object by multiplying the x,y-coordinates by x and y.\n",
      " |      \n",
      " |      If pt is given, the scaling is done relative to that point; the\n",
      " |      object is shifted by -pt, scaled, and shifted by pt.\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      rotate, translate\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import RegularPolygon, Point, Polygon\n",
      " |      >>> t = Polygon(*RegularPolygon(Point(0, 0), 1, 3).vertices)\n",
      " |      >>> t\n",
      " |      Triangle(Point2D(1, 0), Point2D(-1/2, sqrt(3)/2), Point2D(-1/2, -sqrt(3)/2))\n",
      " |      >>> t.scale(2)\n",
      " |      Triangle(Point2D(2, 0), Point2D(-1, sqrt(3)/2), Point2D(-1, -sqrt(3)/2))\n",
      " |      >>> t.scale(2, 2)\n",
      " |      Triangle(Point2D(2, 0), Point2D(-1, sqrt(3)), Point2D(-1, -sqrt(3)))\n",
      " |  \n",
      " |  translate(self, x=0, y=0)\n",
      " |      Shift the object by adding to the x,y-coordinates the values x and y.\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      rotate, scale\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import RegularPolygon, Point, Polygon\n",
      " |      >>> t = Polygon(*RegularPolygon(Point(0, 0), 1, 3).vertices)\n",
      " |      >>> t\n",
      " |      Triangle(Point2D(1, 0), Point2D(-1/2, sqrt(3)/2), Point2D(-1/2, -sqrt(3)/2))\n",
      " |      >>> t.translate(2)\n",
      " |      Triangle(Point2D(3, 0), Point2D(3/2, sqrt(3)/2), Point2D(3/2, -sqrt(3)/2))\n",
      " |      >>> t.translate(2, 2)\n",
      " |      Triangle(Point2D(3, 2), Point2D(3/2, sqrt(3)/2 + 2), Point2D(3/2, 2 - sqrt(3)/2))\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Methods inherited from sympy.sets.sets.Set:\n",
      " |  \n",
      " |  __add__(self, other)\n",
      " |  \n",
      " |  __and__(self, other)\n",
      " |  \n",
      " |  __mul__(self, other)\n",
      " |  \n",
      " |  __or__(self, other)\n",
      " |  \n",
      " |  __pow__(self, exp)\n",
      " |  \n",
      " |  __sub__(self, other)\n",
      " |  \n",
      " |  __xor__(self, other)\n",
      " |  \n",
      " |  complement(self, universe)\n",
      " |      The complement of 'self' w.r.t the given universe.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Interval, S\n",
      " |      >>> Interval(0, 1).complement(S.Reals)\n",
      " |      Union(Interval.open(-oo, 0), Interval.open(1, oo))\n",
      " |      \n",
      " |      >>> Interval(0, 1).complement(S.UniversalSet)\n",
      " |      Complement(UniversalSet, Interval(0, 1))\n",
      " |  \n",
      " |  contains(self, other)\n",
      " |      Returns a SymPy value indicating whether ``other`` is contained\n",
      " |      in ``self``: ``true`` if it is, ``false`` if it is not, else\n",
      " |      an unevaluated ``Contains`` expression (or, as in the case of\n",
      " |      ConditionSet and a union of FiniteSet/Intervals, an expression\n",
      " |      indicating the conditions for containment).\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Interval, S\n",
      " |      >>> from sympy.abc import x\n",
      " |      \n",
      " |      >>> Interval(0, 1).contains(0.5)\n",
      " |      True\n",
      " |      \n",
      " |      As a shortcut it is possible to use the ``in`` operator, but that\n",
      " |      will raise an error unless an affirmative true or false is not\n",
      " |      obtained.\n",
      " |      \n",
      " |      >>> Interval(0, 1).contains(x)\n",
      " |      (0 <= x) & (x <= 1)\n",
      " |      >>> x in Interval(0, 1)\n",
      " |      Traceback (most recent call last):\n",
      " |      ...\n",
      " |      TypeError: did not evaluate to a bool: None\n",
      " |      \n",
      " |      The result of 'in' is a bool, not a SymPy value\n",
      " |      \n",
      " |      >>> 1 in Interval(0, 2)\n",
      " |      True\n",
      " |      >>> _ is S.true\n",
      " |      False\n",
      " |  \n",
      " |  intersect(self, other)\n",
      " |      Returns the intersection of 'self' and 'other'.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Interval\n",
      " |      \n",
      " |      >>> Interval(1, 3).intersect(Interval(1, 2))\n",
      " |      Interval(1, 2)\n",
      " |      \n",
      " |      >>> from sympy import imageset, Lambda, symbols, S\n",
      " |      >>> n, m = symbols('n m')\n",
      " |      >>> a = imageset(Lambda(n, 2*n), S.Integers)\n",
      " |      >>> a.intersect(imageset(Lambda(m, 2*m + 1), S.Integers))\n",
      " |      EmptySet\n",
      " |  \n",
      " |  is_disjoint(self, other)\n",
      " |      Returns True if ``self`` and ``other`` are disjoint.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Interval\n",
      " |      >>> Interval(0, 2).is_disjoint(Interval(1, 2))\n",
      " |      False\n",
      " |      >>> Interval(0, 2).is_disjoint(Interval(3, 4))\n",
      " |      True\n",
      " |      \n",
      " |      References\n",
      " |      ==========\n",
      " |      \n",
      " |      .. [1] https://en.wikipedia.org/wiki/Disjoint_sets\n",
      " |  \n",
      " |  is_proper_subset(self, other)\n",
      " |      Returns True if ``self`` is a proper subset of ``other``.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Interval\n",
      " |      >>> Interval(0, 0.5).is_proper_subset(Interval(0, 1))\n",
      " |      True\n",
      " |      >>> Interval(0, 1).is_proper_subset(Interval(0, 1))\n",
      " |      False\n",
      " |  \n",
      " |  is_proper_superset(self, other)\n",
      " |      Returns True if ``self`` is a proper superset of ``other``.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Interval\n",
      " |      >>> Interval(0, 1).is_proper_superset(Interval(0, 0.5))\n",
      " |      True\n",
      " |      >>> Interval(0, 1).is_proper_superset(Interval(0, 1))\n",
      " |      False\n",
      " |  \n",
      " |  is_subset(self, other)\n",
      " |      Returns True if ``self`` is a subset of ``other``.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Interval\n",
      " |      >>> Interval(0, 0.5).is_subset(Interval(0, 1))\n",
      " |      True\n",
      " |      >>> Interval(0, 1).is_subset(Interval(0, 1, left_open=True))\n",
      " |      False\n",
      " |  \n",
      " |  is_superset(self, other)\n",
      " |      Returns True if ``self`` is a superset of ``other``.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Interval\n",
      " |      >>> Interval(0, 0.5).is_superset(Interval(0, 1))\n",
      " |      False\n",
      " |      >>> Interval(0, 1).is_superset(Interval(0, 1, left_open=True))\n",
      " |      True\n",
      " |  \n",
      " |  isdisjoint(self, other)\n",
      " |      Alias for :meth:`is_disjoint()`\n",
      " |  \n",
      " |  issubset(self, other)\n",
      " |      Alias for :meth:`is_subset()`\n",
      " |  \n",
      " |  issuperset(self, other)\n",
      " |      Alias for :meth:`is_superset()`\n",
      " |  \n",
      " |  powerset(self)\n",
      " |      Find the Power set of ``self``.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import EmptySet, FiniteSet, Interval\n",
      " |      \n",
      " |      A power set of an empty set:\n",
      " |      \n",
      " |      >>> A = EmptySet\n",
      " |      >>> A.powerset()\n",
      " |      {EmptySet}\n",
      " |      \n",
      " |      A power set of a finite set:\n",
      " |      \n",
      " |      >>> A = FiniteSet(1, 2)\n",
      " |      >>> a, b, c = FiniteSet(1), FiniteSet(2), FiniteSet(1, 2)\n",
      " |      >>> A.powerset() == FiniteSet(a, b, c, EmptySet)\n",
      " |      True\n",
      " |      \n",
      " |      A power set of an interval:\n",
      " |      \n",
      " |      >>> Interval(1, 2).powerset()\n",
      " |      PowerSet(Interval(1, 2))\n",
      " |      \n",
      " |      References\n",
      " |      ==========\n",
      " |      \n",
      " |      .. [1] https://en.wikipedia.org/wiki/Power_set\n",
      " |  \n",
      " |  symmetric_difference(self, other)\n",
      " |      Returns symmetric difference of ``self`` and ``other``.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Interval, S\n",
      " |      >>> Interval(1, 3).symmetric_difference(S.Reals)\n",
      " |      Union(Interval.open(-oo, 1), Interval.open(3, oo))\n",
      " |      >>> Interval(1, 10).symmetric_difference(S.Reals)\n",
      " |      Union(Interval.open(-oo, 1), Interval.open(10, oo))\n",
      " |      \n",
      " |      >>> from sympy import S, EmptySet\n",
      " |      >>> S.Reals.symmetric_difference(EmptySet)\n",
      " |      Reals\n",
      " |      \n",
      " |      References\n",
      " |      ==========\n",
      " |      .. [1] https://en.wikipedia.org/wiki/Symmetric_difference\n",
      " |  \n",
      " |  union(self, other)\n",
      " |      Returns the union of ``self`` and ``other``.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      As a shortcut it is possible to use the ``+`` operator:\n",
      " |      \n",
      " |      >>> from sympy import Interval, FiniteSet\n",
      " |      >>> Interval(0, 1).union(Interval(2, 3))\n",
      " |      Union(Interval(0, 1), Interval(2, 3))\n",
      " |      >>> Interval(0, 1) + Interval(2, 3)\n",
      " |      Union(Interval(0, 1), Interval(2, 3))\n",
      " |      >>> Interval(1, 2, True, True) + FiniteSet(2, 3)\n",
      " |      Union({3}, Interval.Lopen(1, 2))\n",
      " |      \n",
      " |      Similarly it is possible to use the ``-`` operator for set differences:\n",
      " |      \n",
      " |      >>> Interval(0, 2) - Interval(0, 1)\n",
      " |      Interval.Lopen(1, 2)\n",
      " |      >>> Interval(1, 3) - FiniteSet(2)\n",
      " |      Union(Interval.Ropen(1, 2), Interval.Lopen(2, 3))\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Readonly properties inherited from sympy.sets.sets.Set:\n",
      " |  \n",
      " |  boundary\n",
      " |      The boundary or frontier of a set.\n",
      " |      \n",
      " |      Explanation\n",
      " |      ===========\n",
      " |      \n",
      " |      A point x is on the boundary of a set S if\n",
      " |      \n",
      " |      1.  x is in the closure of S.\n",
      " |          I.e. Every neighborhood of x contains a point in S.\n",
      " |      2.  x is not in the interior of S.\n",
      " |          I.e. There does not exist an open set centered on x contained\n",
      " |          entirely within S.\n",
      " |      \n",
      " |      There are the points on the outer rim of S.  If S is open then these\n",
      " |      points need not actually be contained within S.\n",
      " |      \n",
      " |      For example, the boundary of an interval is its start and end points.\n",
      " |      This is true regardless of whether or not the interval is open.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Interval\n",
      " |      >>> Interval(0, 1).boundary\n",
      " |      {0, 1}\n",
      " |      >>> Interval(0, 1, True, False).boundary\n",
      " |      {0, 1}\n",
      " |  \n",
      " |  closure\n",
      " |      Property method which returns the closure of a set.\n",
      " |      The closure is defined as the union of the set itself and its\n",
      " |      boundary.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      >>> from sympy import S, Interval\n",
      " |      >>> S.Reals.closure\n",
      " |      Reals\n",
      " |      >>> Interval(0, 1).closure\n",
      " |      Interval(0, 1)\n",
      " |  \n",
      " |  inf\n",
      " |      The infimum of ``self``.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Interval, Union\n",
      " |      >>> Interval(0, 1).inf\n",
      " |      0\n",
      " |      >>> Union(Interval(0, 1), Interval(2, 3)).inf\n",
      " |      0\n",
      " |  \n",
      " |  interior\n",
      " |      Property method which returns the interior of a set.\n",
      " |      The interior of a set S consists all points of S that do not\n",
      " |      belong to the boundary of S.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      >>> from sympy import Interval\n",
      " |      >>> Interval(0, 1).interior\n",
      " |      Interval.open(0, 1)\n",
      " |      >>> Interval(0, 1).boundary.interior\n",
      " |      EmptySet\n",
      " |  \n",
      " |  is_EmptySet\n",
      " |  \n",
      " |  is_closed\n",
      " |      A property method to check whether a set is closed.\n",
      " |      \n",
      " |      Explanation\n",
      " |      ===========\n",
      " |      \n",
      " |      A set is closed if its complement is an open set. The closedness of a\n",
      " |      subset of the reals is determined with respect to R and its standard\n",
      " |      topology.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      >>> from sympy import Interval\n",
      " |      >>> Interval(0, 1).is_closed\n",
      " |      True\n",
      " |  \n",
      " |  is_open\n",
      " |      Property method to check whether a set is open.\n",
      " |      \n",
      " |      Explanation\n",
      " |      ===========\n",
      " |      \n",
      " |      A set is open if and only if it has an empty intersection with its\n",
      " |      boundary. In particular, a subset A of the reals is open if and only\n",
      " |      if each one of its points is contained in an open interval that is a\n",
      " |      subset of A.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      >>> from sympy import S\n",
      " |      >>> S.Reals.is_open\n",
      " |      True\n",
      " |      >>> S.Rationals.is_open\n",
      " |      False\n",
      " |  \n",
      " |  kind\n",
      " |      The kind of a Set\n",
      " |      \n",
      " |      Explanation\n",
      " |      ===========\n",
      " |      \n",
      " |      Any :class:`Set` will have kind :class:`SetKind` which is\n",
      " |      parametrised by the kind of the elements of the set. For example\n",
      " |      most sets are sets of numbers and will have kind\n",
      " |      ``SetKind(NumberKind)``. If elements of sets are different in kind than\n",
      " |      their kind will ``SetKind(UndefinedKind)``. See\n",
      " |      :class:`sympy.core.kind.Kind` for an explanation of the kind system.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Interval, Matrix, FiniteSet, EmptySet, ProductSet, PowerSet\n",
      " |      \n",
      " |      >>> FiniteSet(Matrix([1, 2])).kind\n",
      " |      SetKind(MatrixKind(NumberKind))\n",
      " |      \n",
      " |      >>> Interval(1, 2).kind\n",
      " |      SetKind(NumberKind)\n",
      " |      \n",
      " |      >>> EmptySet.kind\n",
      " |      SetKind()\n",
      " |      \n",
      " |      A :class:`sympy.sets.powerset.PowerSet` is a set of sets:\n",
      " |      \n",
      " |      >>> PowerSet({1, 2, 3}).kind\n",
      " |      SetKind(SetKind(NumberKind))\n",
      " |      \n",
      " |      A :class:`ProductSet` represents the set of tuples of elements of\n",
      " |      other sets. Its kind is :class:`sympy.core.containers.TupleKind`\n",
      " |      parametrised by the kinds of the elements of those sets:\n",
      " |      \n",
      " |      >>> p = ProductSet(FiniteSet(1, 2), FiniteSet(3, 4))\n",
      " |      >>> list(p)\n",
      " |      [(1, 3), (2, 3), (1, 4), (2, 4)]\n",
      " |      >>> p.kind\n",
      " |      SetKind(TupleKind(NumberKind, NumberKind))\n",
      " |      \n",
      " |      When all elements of the set do not have same kind, the kind\n",
      " |      will be returned as ``SetKind(UndefinedKind)``:\n",
      " |      \n",
      " |      >>> FiniteSet(0, Matrix([1, 2])).kind\n",
      " |      SetKind(UndefinedKind)\n",
      " |      \n",
      " |      The kind of the elements of a set are given by the ``element_kind``\n",
      " |      attribute of ``SetKind``:\n",
      " |      \n",
      " |      >>> Interval(1, 2).kind.element_kind\n",
      " |      NumberKind\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      NumberKind\n",
      " |      sympy.core.kind.UndefinedKind\n",
      " |      sympy.core.containers.TupleKind\n",
      " |      MatrixKind\n",
      " |      sympy.matrices.expressions.sets.MatrixSet\n",
      " |      sympy.sets.conditionset.ConditionSet\n",
      " |      Rationals\n",
      " |      Naturals\n",
      " |      Integers\n",
      " |      sympy.sets.fancysets.ImageSet\n",
      " |      sympy.sets.fancysets.Range\n",
      " |      sympy.sets.fancysets.ComplexRegion\n",
      " |      sympy.sets.powerset.PowerSet\n",
      " |      sympy.sets.sets.ProductSet\n",
      " |      sympy.sets.sets.Interval\n",
      " |      sympy.sets.sets.Union\n",
      " |      sympy.sets.sets.Intersection\n",
      " |      sympy.sets.sets.Complement\n",
      " |      sympy.sets.sets.EmptySet\n",
      " |      sympy.sets.sets.UniversalSet\n",
      " |      sympy.sets.sets.FiniteSet\n",
      " |      sympy.sets.sets.SymmetricDifference\n",
      " |      sympy.sets.sets.DisjointUnion\n",
      " |  \n",
      " |  measure\n",
      " |      The (Lebesgue) measure of ``self``.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Interval, Union\n",
      " |      >>> Interval(0, 1).measure\n",
      " |      1\n",
      " |      >>> Union(Interval(0, 1), Interval(2, 3)).measure\n",
      " |      2\n",
      " |  \n",
      " |  sup\n",
      " |      The supremum of ``self``.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Interval, Union\n",
      " |      >>> Interval(0, 1).sup\n",
      " |      1\n",
      " |      >>> Union(Interval(0, 1), Interval(2, 3)).sup\n",
      " |      3\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Data and other attributes inherited from sympy.sets.sets.Set:\n",
      " |  \n",
      " |  is_Complement = None\n",
      " |  \n",
      " |  is_ComplexRegion = False\n",
      " |  \n",
      " |  is_FiniteSet = False\n",
      " |  \n",
      " |  is_Intersection = None\n",
      " |  \n",
      " |  is_Interval = False\n",
      " |  \n",
      " |  is_ProductSet = False\n",
      " |  \n",
      " |  is_Union = False\n",
      " |  \n",
      " |  is_UniversalSet = None\n",
      " |  \n",
      " |  is_empty = None\n",
      " |  \n",
      " |  is_finite_set = None\n",
      " |  \n",
      " |  is_interval = False\n",
      " |  \n",
      " |  is_iterable = False\n",
      " |  \n",
      " |  is_number = False\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Methods inherited from sympy.core.basic.Basic:\n",
      " |  \n",
      " |  __eq__(self, other)\n",
      " |      Return a boolean indicating whether a == b on the basis of\n",
      " |      their symbolic trees.\n",
      " |      \n",
      " |      This is the same as a.compare(b) == 0 but faster.\n",
      " |      \n",
      " |      Notes\n",
      " |      =====\n",
      " |      \n",
      " |      If a class that overrides __eq__() needs to retain the\n",
      " |      implementation of __hash__() from a parent class, the\n",
      " |      interpreter must be told this explicitly by setting\n",
      " |      __hash__ : Callable[[object], int] = <ParentClass>.__hash__.\n",
      " |      Otherwise the inheritance of __hash__() will be blocked,\n",
      " |      just as if __hash__ had been explicitly set to None.\n",
      " |      \n",
      " |      References\n",
      " |      ==========\n",
      " |      \n",
      " |      from http://docs.python.org/dev/reference/datamodel.html#object.__hash__\n",
      " |  \n",
      " |  __getstate__(self)\n",
      " |  \n",
      " |  __hash__(self) -> 'int'\n",
      " |      Return hash(self).\n",
      " |  \n",
      " |  __reduce_ex__(self, protocol)\n",
      " |      Helper for pickle.\n",
      " |  \n",
      " |  __setstate__(self, state)\n",
      " |  \n",
      " |  as_content_primitive(self, radical=False, clear=True)\n",
      " |      A stub to allow Basic args (like Tuple) to be skipped when computing\n",
      " |      the content and primitive components of an expression.\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      sympy.core.expr.Expr.as_content_primitive\n",
      " |  \n",
      " |  as_dummy(self)\n",
      " |      Return the expression with any objects having structurally\n",
      " |      bound symbols replaced with unique, canonical symbols within\n",
      " |      the object in which they appear and having only the default\n",
      " |      assumption for commutativity being True. When applied to a\n",
      " |      symbol a new symbol having only the same commutativity will be\n",
      " |      returned.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Integral, Symbol\n",
      " |      >>> from sympy.abc import x\n",
      " |      >>> r = Symbol('r', real=True)\n",
      " |      >>> Integral(r, (r, x)).as_dummy()\n",
      " |      Integral(_0, (_0, x))\n",
      " |      >>> _.variables[0].is_real is None\n",
      " |      True\n",
      " |      >>> r.as_dummy()\n",
      " |      _r\n",
      " |      \n",
      " |      Notes\n",
      " |      =====\n",
      " |      \n",
      " |      Any object that has structurally bound variables should have\n",
      " |      a property, `bound_symbols` that returns those symbols\n",
      " |      appearing in the object.\n",
      " |  \n",
      " |  atoms(self, *types)\n",
      " |      Returns the atoms that form the current object.\n",
      " |      \n",
      " |      By default, only objects that are truly atomic and cannot\n",
      " |      be divided into smaller pieces are returned: symbols, numbers,\n",
      " |      and number symbols like I and pi. It is possible to request\n",
      " |      atoms of any type, however, as demonstrated below.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import I, pi, sin\n",
      " |      >>> from sympy.abc import x, y\n",
      " |      >>> (1 + x + 2*sin(y + I*pi)).atoms()\n",
      " |      {1, 2, I, pi, x, y}\n",
      " |      \n",
      " |      If one or more types are given, the results will contain only\n",
      " |      those types of atoms.\n",
      " |      \n",
      " |      >>> from sympy import Number, NumberSymbol, Symbol\n",
      " |      >>> (1 + x + 2*sin(y + I*pi)).atoms(Symbol)\n",
      " |      {x, y}\n",
      " |      \n",
      " |      >>> (1 + x + 2*sin(y + I*pi)).atoms(Number)\n",
      " |      {1, 2}\n",
      " |      \n",
      " |      >>> (1 + x + 2*sin(y + I*pi)).atoms(Number, NumberSymbol)\n",
      " |      {1, 2, pi}\n",
      " |      \n",
      " |      >>> (1 + x + 2*sin(y + I*pi)).atoms(Number, NumberSymbol, I)\n",
      " |      {1, 2, I, pi}\n",
      " |      \n",
      " |      Note that I (imaginary unit) and zoo (complex infinity) are special\n",
      " |      types of number symbols and are not part of the NumberSymbol class.\n",
      " |      \n",
      " |      The type can be given implicitly, too:\n",
      " |      \n",
      " |      >>> (1 + x + 2*sin(y + I*pi)).atoms(x) # x is a Symbol\n",
      " |      {x, y}\n",
      " |      \n",
      " |      Be careful to check your assumptions when using the implicit option\n",
      " |      since ``S(1).is_Integer = True`` but ``type(S(1))`` is ``One``, a special type\n",
      " |      of SymPy atom, while ``type(S(2))`` is type ``Integer`` and will find all\n",
      " |      integers in an expression:\n",
      " |      \n",
      " |      >>> from sympy import S\n",
      " |      >>> (1 + x + 2*sin(y + I*pi)).atoms(S(1))\n",
      " |      {1}\n",
      " |      \n",
      " |      >>> (1 + x + 2*sin(y + I*pi)).atoms(S(2))\n",
      " |      {1, 2}\n",
      " |      \n",
      " |      Finally, arguments to atoms() can select more than atomic atoms: any\n",
      " |      SymPy type (loaded in core/__init__.py) can be listed as an argument\n",
      " |      and those types of \"atoms\" as found in scanning the arguments of the\n",
      " |      expression recursively:\n",
      " |      \n",
      " |      >>> from sympy import Function, Mul\n",
      " |      >>> from sympy.core.function import AppliedUndef\n",
      " |      >>> f = Function('f')\n",
      " |      >>> (1 + f(x) + 2*sin(y + I*pi)).atoms(Function)\n",
      " |      {f(x), sin(y + I*pi)}\n",
      " |      >>> (1 + f(x) + 2*sin(y + I*pi)).atoms(AppliedUndef)\n",
      " |      {f(x)}\n",
      " |      \n",
      " |      >>> (1 + x + 2*sin(y + I*pi)).atoms(Mul)\n",
      " |      {I*pi, 2*sin(y + I*pi)}\n",
      " |  \n",
      " |  compare(self, other)\n",
      " |      Return -1, 0, 1 if the object is smaller, equal, or greater than other.\n",
      " |      \n",
      " |      Not in the mathematical sense. If the object is of a different type\n",
      " |      from the \"other\" then their classes are ordered according to\n",
      " |      the sorted_classes list.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy.abc import x, y\n",
      " |      >>> x.compare(y)\n",
      " |      -1\n",
      " |      >>> x.compare(x)\n",
      " |      0\n",
      " |      >>> y.compare(x)\n",
      " |      1\n",
      " |  \n",
      " |  copy(self)\n",
      " |  \n",
      " |  could_extract_minus_sign(self)\n",
      " |  \n",
      " |  count(self, query)\n",
      " |      Count the number of matching subexpressions.\n",
      " |  \n",
      " |  count_ops(self, visual=None)\n",
      " |      wrapper for count_ops that returns the operation count.\n",
      " |  \n",
      " |  doit(self, **hints)\n",
      " |      Evaluate objects that are not evaluated by default like limits,\n",
      " |      integrals, sums and products. All objects of this kind will be\n",
      " |      evaluated recursively, unless some species were excluded via 'hints'\n",
      " |      or unless the 'deep' hint was set to 'False'.\n",
      " |      \n",
      " |      >>> from sympy import Integral\n",
      " |      >>> from sympy.abc import x\n",
      " |      \n",
      " |      >>> 2*Integral(x, x)\n",
      " |      2*Integral(x, x)\n",
      " |      \n",
      " |      >>> (2*Integral(x, x)).doit()\n",
      " |      x**2\n",
      " |      \n",
      " |      >>> (2*Integral(x, x)).doit(deep=False)\n",
      " |      2*Integral(x, x)\n",
      " |  \n",
      " |  dummy_eq(self, other, symbol=None)\n",
      " |      Compare two expressions and handle dummy symbols.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Dummy\n",
      " |      >>> from sympy.abc import x, y\n",
      " |      \n",
      " |      >>> u = Dummy('u')\n",
      " |      \n",
      " |      >>> (u**2 + 1).dummy_eq(x**2 + 1)\n",
      " |      True\n",
      " |      >>> (u**2 + 1) == (x**2 + 1)\n",
      " |      False\n",
      " |      \n",
      " |      >>> (u**2 + y).dummy_eq(x**2 + y, x)\n",
      " |      True\n",
      " |      >>> (u**2 + y).dummy_eq(x**2 + y, y)\n",
      " |      False\n",
      " |  \n",
      " |  find(self, query, group=False)\n",
      " |      Find all subexpressions matching a query.\n",
      " |  \n",
      " |  has(self, *patterns)\n",
      " |      Test whether any subexpression matches any of the patterns.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import sin\n",
      " |      >>> from sympy.abc import x, y, z\n",
      " |      >>> (x**2 + sin(x*y)).has(z)\n",
      " |      False\n",
      " |      >>> (x**2 + sin(x*y)).has(x, y, z)\n",
      " |      True\n",
      " |      >>> x.has(x)\n",
      " |      True\n",
      " |      \n",
      " |      Note ``has`` is a structural algorithm with no knowledge of\n",
      " |      mathematics. Consider the following half-open interval:\n",
      " |      \n",
      " |      >>> from sympy import Interval\n",
      " |      >>> i = Interval.Lopen(0, 5); i\n",
      " |      Interval.Lopen(0, 5)\n",
      " |      >>> i.args\n",
      " |      (0, 5, True, False)\n",
      " |      >>> i.has(4)  # there is no \"4\" in the arguments\n",
      " |      False\n",
      " |      >>> i.has(0)  # there *is* a \"0\" in the arguments\n",
      " |      True\n",
      " |      \n",
      " |      Instead, use ``contains`` to determine whether a number is in the\n",
      " |      interval or not:\n",
      " |      \n",
      " |      >>> i.contains(4)\n",
      " |      True\n",
      " |      >>> i.contains(0)\n",
      " |      False\n",
      " |      \n",
      " |      \n",
      " |      Note that ``expr.has(*patterns)`` is exactly equivalent to\n",
      " |      ``any(expr.has(p) for p in patterns)``. In particular, ``False`` is\n",
      " |      returned when the list of patterns is empty.\n",
      " |      \n",
      " |      >>> x.has()\n",
      " |      False\n",
      " |  \n",
      " |  has_free(self, *patterns)\n",
      " |      return True if self has object(s) ``x`` as a free expression\n",
      " |      else False.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Integral, Function\n",
      " |      >>> from sympy.abc import x, y\n",
      " |      >>> f = Function('f')\n",
      " |      >>> g = Function('g')\n",
      " |      >>> expr = Integral(f(x), (f(x), 1, g(y)))\n",
      " |      >>> expr.free_symbols\n",
      " |      {y}\n",
      " |      >>> expr.has_free(g(y))\n",
      " |      True\n",
      " |      >>> expr.has_free(*(x, f(x)))\n",
      " |      False\n",
      " |      \n",
      " |      This works for subexpressions and types, too:\n",
      " |      \n",
      " |      >>> expr.has_free(g)\n",
      " |      True\n",
      " |      >>> (x + y + 1).has_free(y + 1)\n",
      " |      True\n",
      " |  \n",
      " |  is_hypergeometric(self, k)\n",
      " |  \n",
      " |  match(self, pattern, old=False)\n",
      " |      Pattern matching.\n",
      " |      \n",
      " |      Wild symbols match all.\n",
      " |      \n",
      " |      Return ``None`` when expression (self) does not match\n",
      " |      with pattern. Otherwise return a dictionary such that::\n",
      " |      \n",
      " |        pattern.xreplace(self.match(pattern)) == self\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Wild, Sum\n",
      " |      >>> from sympy.abc import x, y\n",
      " |      >>> p = Wild(\"p\")\n",
      " |      >>> q = Wild(\"q\")\n",
      " |      >>> r = Wild(\"r\")\n",
      " |      >>> e = (x+y)**(x+y)\n",
      " |      >>> e.match(p**p)\n",
      " |      {p_: x + y}\n",
      " |      >>> e.match(p**q)\n",
      " |      {p_: x + y, q_: x + y}\n",
      " |      >>> e = (2*x)**2\n",
      " |      >>> e.match(p*q**r)\n",
      " |      {p_: 4, q_: x, r_: 2}\n",
      " |      >>> (p*q**r).xreplace(e.match(p*q**r))\n",
      " |      4*x**2\n",
      " |      \n",
      " |      Structurally bound symbols are ignored during matching:\n",
      " |      \n",
      " |      >>> Sum(x, (x, 1, 2)).match(Sum(y, (y, 1, p)))\n",
      " |      {p_: 2}\n",
      " |      \n",
      " |      But they can be identified if desired:\n",
      " |      \n",
      " |      >>> Sum(x, (x, 1, 2)).match(Sum(q, (q, 1, p)))\n",
      " |      {p_: 2, q_: x}\n",
      " |      \n",
      " |      The ``old`` flag will give the old-style pattern matching where\n",
      " |      expressions and patterns are essentially solved to give the\n",
      " |      match. Both of the following give None unless ``old=True``:\n",
      " |      \n",
      " |      >>> (x - 2).match(p - x, old=True)\n",
      " |      {p_: 2*x - 2}\n",
      " |      >>> (2/x).match(p*x, old=True)\n",
      " |      {p_: 2/x**2}\n",
      " |  \n",
      " |  matches(self, expr, repl_dict=None, old=False)\n",
      " |      Helper method for match() that looks for a match between Wild symbols\n",
      " |      in self and expressions in expr.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import symbols, Wild, Basic\n",
      " |      >>> a, b, c = symbols('a b c')\n",
      " |      >>> x = Wild('x')\n",
      " |      >>> Basic(a + x, x).matches(Basic(a + b, c)) is None\n",
      " |      True\n",
      " |      >>> Basic(a + x, x).matches(Basic(a + b + c, b + c))\n",
      " |      {x_: b + c}\n",
      " |  \n",
      " |  rcall(self, *args)\n",
      " |      Apply on the argument recursively through the expression tree.\n",
      " |      \n",
      " |      This method is used to simulate a common abuse of notation for\n",
      " |      operators. For instance, in SymPy the following will not work:\n",
      " |      \n",
      " |      ``(x+Lambda(y, 2*y))(z) == x+2*z``,\n",
      " |      \n",
      " |      however, you can use:\n",
      " |      \n",
      " |      >>> from sympy import Lambda\n",
      " |      >>> from sympy.abc import x, y, z\n",
      " |      >>> (x + Lambda(y, 2*y)).rcall(z)\n",
      " |      x + 2*z\n",
      " |  \n",
      " |  refine(self, assumption=True)\n",
      " |      See the refine function in sympy.assumptions\n",
      " |  \n",
      " |  replace(self, query, value, map=False, simultaneous=True, exact=None)\n",
      " |      Replace matching subexpressions of ``self`` with ``value``.\n",
      " |      \n",
      " |      If ``map = True`` then also return the mapping {old: new} where ``old``\n",
      " |      was a sub-expression found with query and ``new`` is the replacement\n",
      " |      value for it. If the expression itself does not match the query, then\n",
      " |      the returned value will be ``self.xreplace(map)`` otherwise it should\n",
      " |      be ``self.subs(ordered(map.items()))``.\n",
      " |      \n",
      " |      Traverses an expression tree and performs replacement of matching\n",
      " |      subexpressions from the bottom to the top of the tree. The default\n",
      " |      approach is to do the replacement in a simultaneous fashion so\n",
      " |      changes made are targeted only once. If this is not desired or causes\n",
      " |      problems, ``simultaneous`` can be set to False.\n",
      " |      \n",
      " |      In addition, if an expression containing more than one Wild symbol\n",
      " |      is being used to match subexpressions and the ``exact`` flag is None\n",
      " |      it will be set to True so the match will only succeed if all non-zero\n",
      " |      values are received for each Wild that appears in the match pattern.\n",
      " |      Setting this to False accepts a match of 0; while setting it True\n",
      " |      accepts all matches that have a 0 in them. See example below for\n",
      " |      cautions.\n",
      " |      \n",
      " |      The list of possible combinations of queries and replacement values\n",
      " |      is listed below:\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      Initial setup\n",
      " |      \n",
      " |      >>> from sympy import log, sin, cos, tan, Wild, Mul, Add\n",
      " |      >>> from sympy.abc import x, y\n",
      " |      >>> f = log(sin(x)) + tan(sin(x**2))\n",
      " |      \n",
      " |      1.1. type -> type\n",
      " |          obj.replace(type, newtype)\n",
      " |      \n",
      " |          When object of type ``type`` is found, replace it with the\n",
      " |          result of passing its argument(s) to ``newtype``.\n",
      " |      \n",
      " |          >>> f.replace(sin, cos)\n",
      " |          log(cos(x)) + tan(cos(x**2))\n",
      " |          >>> sin(x).replace(sin, cos, map=True)\n",
      " |          (cos(x), {sin(x): cos(x)})\n",
      " |          >>> (x*y).replace(Mul, Add)\n",
      " |          x + y\n",
      " |      \n",
      " |      1.2. type -> func\n",
      " |          obj.replace(type, func)\n",
      " |      \n",
      " |          When object of type ``type`` is found, apply ``func`` to its\n",
      " |          argument(s). ``func`` must be written to handle the number\n",
      " |          of arguments of ``type``.\n",
      " |      \n",
      " |          >>> f.replace(sin, lambda arg: sin(2*arg))\n",
      " |          log(sin(2*x)) + tan(sin(2*x**2))\n",
      " |          >>> (x*y).replace(Mul, lambda *args: sin(2*Mul(*args)))\n",
      " |          sin(2*x*y)\n",
      " |      \n",
      " |      2.1. pattern -> expr\n",
      " |          obj.replace(pattern(wild), expr(wild))\n",
      " |      \n",
      " |          Replace subexpressions matching ``pattern`` with the expression\n",
      " |          written in terms of the Wild symbols in ``pattern``.\n",
      " |      \n",
      " |          >>> a, b = map(Wild, 'ab')\n",
      " |          >>> f.replace(sin(a), tan(a))\n",
      " |          log(tan(x)) + tan(tan(x**2))\n",
      " |          >>> f.replace(sin(a), tan(a/2))\n",
      " |          log(tan(x/2)) + tan(tan(x**2/2))\n",
      " |          >>> f.replace(sin(a), a)\n",
      " |          log(x) + tan(x**2)\n",
      " |          >>> (x*y).replace(a*x, a)\n",
      " |          y\n",
      " |      \n",
      " |          Matching is exact by default when more than one Wild symbol\n",
      " |          is used: matching fails unless the match gives non-zero\n",
      " |          values for all Wild symbols:\n",
      " |      \n",
      " |          >>> (2*x + y).replace(a*x + b, b - a)\n",
      " |          y - 2\n",
      " |          >>> (2*x).replace(a*x + b, b - a)\n",
      " |          2*x\n",
      " |      \n",
      " |          When set to False, the results may be non-intuitive:\n",
      " |      \n",
      " |          >>> (2*x).replace(a*x + b, b - a, exact=False)\n",
      " |          2/x\n",
      " |      \n",
      " |      2.2. pattern -> func\n",
      " |          obj.replace(pattern(wild), lambda wild: expr(wild))\n",
      " |      \n",
      " |          All behavior is the same as in 2.1 but now a function in terms of\n",
      " |          pattern variables is used rather than an expression:\n",
      " |      \n",
      " |          >>> f.replace(sin(a), lambda a: sin(2*a))\n",
      " |          log(sin(2*x)) + tan(sin(2*x**2))\n",
      " |      \n",
      " |      3.1. func -> func\n",
      " |          obj.replace(filter, func)\n",
      " |      \n",
      " |          Replace subexpression ``e`` with ``func(e)`` if ``filter(e)``\n",
      " |          is True.\n",
      " |      \n",
      " |          >>> g = 2*sin(x**3)\n",
      " |          >>> g.replace(lambda expr: expr.is_Number, lambda expr: expr**2)\n",
      " |          4*sin(x**9)\n",
      " |      \n",
      " |      The expression itself is also targeted by the query but is done in\n",
      " |      such a fashion that changes are not made twice.\n",
      " |      \n",
      " |          >>> e = x*(x*y + 1)\n",
      " |          >>> e.replace(lambda x: x.is_Mul, lambda x: 2*x)\n",
      " |          2*x*(2*x*y + 1)\n",
      " |      \n",
      " |      When matching a single symbol, `exact` will default to True, but\n",
      " |      this may or may not be the behavior that is desired:\n",
      " |      \n",
      " |      Here, we want `exact=False`:\n",
      " |      \n",
      " |      >>> from sympy import Function\n",
      " |      >>> f = Function('f')\n",
      " |      >>> e = f(1) + f(0)\n",
      " |      >>> q = f(a), lambda a: f(a + 1)\n",
      " |      >>> e.replace(*q, exact=False)\n",
      " |      f(1) + f(2)\n",
      " |      >>> e.replace(*q, exact=True)\n",
      " |      f(0) + f(2)\n",
      " |      \n",
      " |      But here, the nature of matching makes selecting\n",
      " |      the right setting tricky:\n",
      " |      \n",
      " |      >>> e = x**(1 + y)\n",
      " |      >>> (x**(1 + y)).replace(x**(1 + a), lambda a: x**-a, exact=False)\n",
      " |      x\n",
      " |      >>> (x**(1 + y)).replace(x**(1 + a), lambda a: x**-a, exact=True)\n",
      " |      x**(-x - y + 1)\n",
      " |      >>> (x**y).replace(x**(1 + a), lambda a: x**-a, exact=False)\n",
      " |      x\n",
      " |      >>> (x**y).replace(x**(1 + a), lambda a: x**-a, exact=True)\n",
      " |      x**(1 - y)\n",
      " |      \n",
      " |      It is probably better to use a different form of the query\n",
      " |      that describes the target expression more precisely:\n",
      " |      \n",
      " |      >>> (1 + x**(1 + y)).replace(\n",
      " |      ... lambda x: x.is_Pow and x.exp.is_Add and x.exp.args[0] == 1,\n",
      " |      ... lambda x: x.base**(1 - (x.exp - 1)))\n",
      " |      ...\n",
      " |      x**(1 - y) + 1\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      subs: substitution of subexpressions as defined by the objects\n",
      " |            themselves.\n",
      " |      xreplace: exact node replacement in expr tree; also capable of\n",
      " |                using matching rules\n",
      " |  \n",
      " |  rewrite(self, *args, deep=True, **hints)\n",
      " |      Rewrite *self* using a defined rule.\n",
      " |      \n",
      " |      Rewriting transforms an expression to another, which is mathematically\n",
      " |      equivalent but structurally different. For example you can rewrite\n",
      " |      trigonometric functions as complex exponentials or combinatorial\n",
      " |      functions as gamma function.\n",
      " |      \n",
      " |      This method takes a *pattern* and a *rule* as positional arguments.\n",
      " |      *pattern* is optional parameter which defines the types of expressions\n",
      " |      that will be transformed. If it is not passed, all possible expressions\n",
      " |      will be rewritten. *rule* defines how the expression will be rewritten.\n",
      " |      \n",
      " |      Parameters\n",
      " |      ==========\n",
      " |      \n",
      " |      args : *rule*, or *pattern* and *rule*.\n",
      " |          - *pattern* is a type or an iterable of types.\n",
      " |          - *rule* can be any object.\n",
      " |      \n",
      " |      deep : bool, optional.\n",
      " |          If ``True``, subexpressions are recursively transformed. Default is\n",
      " |          ``True``.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      If *pattern* is unspecified, all possible expressions are transformed.\n",
      " |      \n",
      " |      >>> from sympy import cos, sin, exp, I\n",
      " |      >>> from sympy.abc import x\n",
      " |      >>> expr = cos(x) + I*sin(x)\n",
      " |      >>> expr.rewrite(exp)\n",
      " |      exp(I*x)\n",
      " |      \n",
      " |      Pattern can be a type or an iterable of types.\n",
      " |      \n",
      " |      >>> expr.rewrite(sin, exp)\n",
      " |      exp(I*x)/2 + cos(x) - exp(-I*x)/2\n",
      " |      >>> expr.rewrite([cos,], exp)\n",
      " |      exp(I*x)/2 + I*sin(x) + exp(-I*x)/2\n",
      " |      >>> expr.rewrite([cos, sin], exp)\n",
      " |      exp(I*x)\n",
      " |      \n",
      " |      Rewriting behavior can be implemented by defining ``_eval_rewrite()``\n",
      " |      method.\n",
      " |      \n",
      " |      >>> from sympy import Expr, sqrt, pi\n",
      " |      >>> class MySin(Expr):\n",
      " |      ...     def _eval_rewrite(self, rule, args, **hints):\n",
      " |      ...         x, = args\n",
      " |      ...         if rule == cos:\n",
      " |      ...             return cos(pi/2 - x, evaluate=False)\n",
      " |      ...         if rule == sqrt:\n",
      " |      ...             return sqrt(1 - cos(x)**2)\n",
      " |      >>> MySin(MySin(x)).rewrite(cos)\n",
      " |      cos(-cos(-x + pi/2) + pi/2)\n",
      " |      >>> MySin(x).rewrite(sqrt)\n",
      " |      sqrt(1 - cos(x)**2)\n",
      " |      \n",
      " |      Defining ``_eval_rewrite_as_[...]()`` method is supported for backwards\n",
      " |      compatibility reason. This may be removed in the future and using it is\n",
      " |      discouraged.\n",
      " |      \n",
      " |      >>> class MySin(Expr):\n",
      " |      ...     def _eval_rewrite_as_cos(self, *args, **hints):\n",
      " |      ...         x, = args\n",
      " |      ...         return cos(pi/2 - x, evaluate=False)\n",
      " |      >>> MySin(x).rewrite(cos)\n",
      " |      cos(-x + pi/2)\n",
      " |  \n",
      " |  simplify(self, **kwargs)\n",
      " |      See the simplify function in sympy.simplify\n",
      " |  \n",
      " |  sort_key(self, order=None)\n",
      " |      Return a sort key.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import S, I\n",
      " |      \n",
      " |      >>> sorted([S(1)/2, I, -I], key=lambda x: x.sort_key())\n",
      " |      [1/2, -I, I]\n",
      " |      \n",
      " |      >>> S(\"[x, 1/x, 1/x**2, x**2, x**(1/2), x**(1/4), x**(3/2)]\")\n",
      " |      [x, 1/x, x**(-2), x**2, sqrt(x), x**(1/4), x**(3/2)]\n",
      " |      >>> sorted(_, key=lambda x: x.sort_key())\n",
      " |      [x**(-2), 1/x, x**(1/4), sqrt(x), x, x**(3/2), x**2]\n",
      " |  \n",
      " |  subs(self, *args, **kwargs)\n",
      " |      Substitutes old for new in an expression after sympifying args.\n",
      " |      \n",
      " |      `args` is either:\n",
      " |        - two arguments, e.g. foo.subs(old, new)\n",
      " |        - one iterable argument, e.g. foo.subs(iterable). The iterable may be\n",
      " |           o an iterable container with (old, new) pairs. In this case the\n",
      " |             replacements are processed in the order given with successive\n",
      " |             patterns possibly affecting replacements already made.\n",
      " |           o a dict or set whose key/value items correspond to old/new pairs.\n",
      " |             In this case the old/new pairs will be sorted by op count and in\n",
      " |             case of a tie, by number of args and the default_sort_key. The\n",
      " |             resulting sorted list is then processed as an iterable container\n",
      " |             (see previous).\n",
      " |      \n",
      " |      If the keyword ``simultaneous`` is True, the subexpressions will not be\n",
      " |      evaluated until all the substitutions have been made.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import pi, exp, limit, oo\n",
      " |      >>> from sympy.abc import x, y\n",
      " |      >>> (1 + x*y).subs(x, pi)\n",
      " |      pi*y + 1\n",
      " |      >>> (1 + x*y).subs({x:pi, y:2})\n",
      " |      1 + 2*pi\n",
      " |      >>> (1 + x*y).subs([(x, pi), (y, 2)])\n",
      " |      1 + 2*pi\n",
      " |      >>> reps = [(y, x**2), (x, 2)]\n",
      " |      >>> (x + y).subs(reps)\n",
      " |      6\n",
      " |      >>> (x + y).subs(reversed(reps))\n",
      " |      x**2 + 2\n",
      " |      \n",
      " |      >>> (x**2 + x**4).subs(x**2, y)\n",
      " |      y**2 + y\n",
      " |      \n",
      " |      To replace only the x**2 but not the x**4, use xreplace:\n",
      " |      \n",
      " |      >>> (x**2 + x**4).xreplace({x**2: y})\n",
      " |      x**4 + y\n",
      " |      \n",
      " |      To delay evaluation until all substitutions have been made,\n",
      " |      set the keyword ``simultaneous`` to True:\n",
      " |      \n",
      " |      >>> (x/y).subs([(x, 0), (y, 0)])\n",
      " |      0\n",
      " |      >>> (x/y).subs([(x, 0), (y, 0)], simultaneous=True)\n",
      " |      nan\n",
      " |      \n",
      " |      This has the added feature of not allowing subsequent substitutions\n",
      " |      to affect those already made:\n",
      " |      \n",
      " |      >>> ((x + y)/y).subs({x + y: y, y: x + y})\n",
      " |      1\n",
      " |      >>> ((x + y)/y).subs({x + y: y, y: x + y}, simultaneous=True)\n",
      " |      y/(x + y)\n",
      " |      \n",
      " |      In order to obtain a canonical result, unordered iterables are\n",
      " |      sorted by count_op length, number of arguments and by the\n",
      " |      default_sort_key to break any ties. All other iterables are left\n",
      " |      unsorted.\n",
      " |      \n",
      " |      >>> from sympy import sqrt, sin, cos\n",
      " |      >>> from sympy.abc import a, b, c, d, e\n",
      " |      \n",
      " |      >>> A = (sqrt(sin(2*x)), a)\n",
      " |      >>> B = (sin(2*x), b)\n",
      " |      >>> C = (cos(2*x), c)\n",
      " |      >>> D = (x, d)\n",
      " |      >>> E = (exp(x), e)\n",
      " |      \n",
      " |      >>> expr = sqrt(sin(2*x))*sin(exp(x)*x)*cos(2*x) + sin(2*x)\n",
      " |      \n",
      " |      >>> expr.subs(dict([A, B, C, D, E]))\n",
      " |      a*c*sin(d*e) + b\n",
      " |      \n",
      " |      The resulting expression represents a literal replacement of the\n",
      " |      old arguments with the new arguments. This may not reflect the\n",
      " |      limiting behavior of the expression:\n",
      " |      \n",
      " |      >>> (x**3 - 3*x).subs({x: oo})\n",
      " |      nan\n",
      " |      \n",
      " |      >>> limit(x**3 - 3*x, x, oo)\n",
      " |      oo\n",
      " |      \n",
      " |      If the substitution will be followed by numerical\n",
      " |      evaluation, it is better to pass the substitution to\n",
      " |      evalf as\n",
      " |      \n",
      " |      >>> (1/x).evalf(subs={x: 3.0}, n=21)\n",
      " |      0.333333333333333333333\n",
      " |      \n",
      " |      rather than\n",
      " |      \n",
      " |      >>> (1/x).subs({x: 3.0}).evalf(21)\n",
      " |      0.333333333333333314830\n",
      " |      \n",
      " |      as the former will ensure that the desired level of precision is\n",
      " |      obtained.\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      replace: replacement capable of doing wildcard-like matching,\n",
      " |               parsing of match, and conditional replacements\n",
      " |      xreplace: exact node replacement in expr tree; also capable of\n",
      " |                using matching rules\n",
      " |      sympy.core.evalf.EvalfMixin.evalf: calculates the given formula to a desired level of precision\n",
      " |  \n",
      " |  xreplace(self, rule)\n",
      " |      Replace occurrences of objects within the expression.\n",
      " |      \n",
      " |      Parameters\n",
      " |      ==========\n",
      " |      \n",
      " |      rule : dict-like\n",
      " |          Expresses a replacement rule\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      xreplace : the result of the replacement\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import symbols, pi, exp\n",
      " |      >>> x, y, z = symbols('x y z')\n",
      " |      >>> (1 + x*y).xreplace({x: pi})\n",
      " |      pi*y + 1\n",
      " |      >>> (1 + x*y).xreplace({x: pi, y: 2})\n",
      " |      1 + 2*pi\n",
      " |      \n",
      " |      Replacements occur only if an entire node in the expression tree is\n",
      " |      matched:\n",
      " |      \n",
      " |      >>> (x*y + z).xreplace({x*y: pi})\n",
      " |      z + pi\n",
      " |      >>> (x*y*z).xreplace({x*y: pi})\n",
      " |      x*y*z\n",
      " |      >>> (2*x).xreplace({2*x: y, x: z})\n",
      " |      y\n",
      " |      >>> (2*2*x).xreplace({2*x: y, x: z})\n",
      " |      4*z\n",
      " |      >>> (x + y + 2).xreplace({x + y: 2})\n",
      " |      x + y + 2\n",
      " |      >>> (x + 2 + exp(x + 2)).xreplace({x + 2: y})\n",
      " |      x + exp(y) + 2\n",
      " |      \n",
      " |      xreplace does not differentiate between free and bound symbols. In the\n",
      " |      following, subs(x, y) would not change x since it is a bound symbol,\n",
      " |      but xreplace does:\n",
      " |      \n",
      " |      >>> from sympy import Integral\n",
      " |      >>> Integral(x, (x, 1, 2*x)).xreplace({x: y})\n",
      " |      Integral(y, (y, 1, 2*y))\n",
      " |      \n",
      " |      Trying to replace x with an expression raises an error:\n",
      " |      \n",
      " |      >>> Integral(x, (x, 1, 2*x)).xreplace({x: 2*y}) # doctest: +SKIP\n",
      " |      ValueError: Invalid limits given: ((2*y, 1, 4*y),)\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      replace: replacement capable of doing wildcard-like matching,\n",
      " |               parsing of match, and conditional replacements\n",
      " |      subs: substitution of subexpressions as defined by the objects\n",
      " |            themselves.\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Class methods inherited from sympy.core.basic.Basic:\n",
      " |  \n",
      " |  class_key() from sympy.core.assumptions.ManagedProperties\n",
      " |      Nice order of classes.\n",
      " |  \n",
      " |  fromiter(args, **assumptions) from sympy.core.assumptions.ManagedProperties\n",
      " |      Create a new object from an iterable.\n",
      " |      \n",
      " |      This is a convenience function that allows one to create objects from\n",
      " |      any iterable, without having to convert to a list or tuple first.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Tuple\n",
      " |      >>> Tuple.fromiter(i for i in range(5))\n",
      " |      (0, 1, 2, 3, 4)\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Readonly properties inherited from sympy.core.basic.Basic:\n",
      " |  \n",
      " |  args\n",
      " |      Returns a tuple of arguments of 'self'.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import cot\n",
      " |      >>> from sympy.abc import x, y\n",
      " |      \n",
      " |      >>> cot(x).args\n",
      " |      (x,)\n",
      " |      \n",
      " |      >>> cot(x).args[0]\n",
      " |      x\n",
      " |      \n",
      " |      >>> (x*y).args\n",
      " |      (x, y)\n",
      " |      \n",
      " |      >>> (x*y).args[1]\n",
      " |      y\n",
      " |      \n",
      " |      Notes\n",
      " |      =====\n",
      " |      \n",
      " |      Never use self._args, always use self.args.\n",
      " |      Only use _args in __new__ when creating a new function.\n",
      " |      Do not override .args() from Basic (so that it is easy to\n",
      " |      change the interface in the future if needed).\n",
      " |  \n",
      " |  assumptions0\n",
      " |      Return object `type` assumptions.\n",
      " |      \n",
      " |      For example:\n",
      " |      \n",
      " |        Symbol('x', real=True)\n",
      " |        Symbol('x', integer=True)\n",
      " |      \n",
      " |      are different objects. In other words, besides Python type (Symbol in\n",
      " |      this case), the initial assumptions are also forming their typeinfo.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Symbol\n",
      " |      >>> from sympy.abc import x\n",
      " |      >>> x.assumptions0\n",
      " |      {'commutative': True}\n",
      " |      >>> x = Symbol(\"x\", positive=True)\n",
      " |      >>> x.assumptions0\n",
      " |      {'commutative': True, 'complex': True, 'extended_negative': False,\n",
      " |       'extended_nonnegative': True, 'extended_nonpositive': False,\n",
      " |       'extended_nonzero': True, 'extended_positive': True, 'extended_real':\n",
      " |       True, 'finite': True, 'hermitian': True, 'imaginary': False,\n",
      " |       'infinite': False, 'negative': False, 'nonnegative': True,\n",
      " |       'nonpositive': False, 'nonzero': True, 'positive': True, 'real':\n",
      " |       True, 'zero': False}\n",
      " |  \n",
      " |  canonical_variables\n",
      " |      Return a dictionary mapping any variable defined in\n",
      " |      ``self.bound_symbols`` to Symbols that do not clash\n",
      " |      with any free symbols in the expression.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Lambda\n",
      " |      >>> from sympy.abc import x\n",
      " |      >>> Lambda(x, 2*x).canonical_variables\n",
      " |      {x: _0}\n",
      " |  \n",
      " |  expr_free_symbols\n",
      " |  \n",
      " |  free_symbols\n",
      " |      Return from the atoms of self those which are free symbols.\n",
      " |      \n",
      " |      Not all free symbols are ``Symbol``. Eg: IndexedBase('I')[0].free_symbols\n",
      " |      \n",
      " |      For most expressions, all symbols are free symbols. For some classes\n",
      " |      this is not true. e.g. Integrals use Symbols for the dummy variables\n",
      " |      which are bound variables, so Integral has a method to return all\n",
      " |      symbols except those. Derivative keeps track of symbols with respect\n",
      " |      to which it will perform a derivative; those are\n",
      " |      bound variables, too, so it has its own free_symbols method.\n",
      " |      \n",
      " |      Any other method that uses bound variables should implement a\n",
      " |      free_symbols method.\n",
      " |  \n",
      " |  func\n",
      " |      The top-level function in an expression.\n",
      " |      \n",
      " |      The following should hold for all objects::\n",
      " |      \n",
      " |          >> x == x.func(*x.args)\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy.abc import x\n",
      " |      >>> a = 2*x\n",
      " |      >>> a.func\n",
      " |      <class 'sympy.core.mul.Mul'>\n",
      " |      >>> a.args\n",
      " |      (2, x)\n",
      " |      >>> a.func(*a.args)\n",
      " |      2*x\n",
      " |      >>> a == a.func(*a.args)\n",
      " |      True\n",
      " |  \n",
      " |  is_algebraic\n",
      " |  \n",
      " |  is_antihermitian\n",
      " |  \n",
      " |  is_commutative\n",
      " |  \n",
      " |  is_comparable\n",
      " |      Return True if self can be computed to a real number\n",
      " |      (or already is a real number) with precision, else False.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import exp_polar, pi, I\n",
      " |      >>> (I*exp_polar(I*pi/2)).is_comparable\n",
      " |      True\n",
      " |      >>> (I*exp_polar(I*pi*2)).is_comparable\n",
      " |      False\n",
      " |      \n",
      " |      A False result does not mean that `self` cannot be rewritten\n",
      " |      into a form that would be comparable. For example, the\n",
      " |      difference computed below is zero but without simplification\n",
      " |      it does not evaluate to a zero with precision:\n",
      " |      \n",
      " |      >>> e = 2**pi*(1 + 2**pi)\n",
      " |      >>> dif = e - e.expand()\n",
      " |      >>> dif.is_comparable\n",
      " |      False\n",
      " |      >>> dif.n(2)._prec\n",
      " |      1\n",
      " |  \n",
      " |  is_complex\n",
      " |  \n",
      " |  is_composite\n",
      " |  \n",
      " |  is_even\n",
      " |  \n",
      " |  is_extended_negative\n",
      " |  \n",
      " |  is_extended_nonnegative\n",
      " |  \n",
      " |  is_extended_nonpositive\n",
      " |  \n",
      " |  is_extended_nonzero\n",
      " |  \n",
      " |  is_extended_positive\n",
      " |  \n",
      " |  is_extended_real\n",
      " |  \n",
      " |  is_finite\n",
      " |  \n",
      " |  is_hermitian\n",
      " |  \n",
      " |  is_imaginary\n",
      " |  \n",
      " |  is_infinite\n",
      " |  \n",
      " |  is_integer\n",
      " |  \n",
      " |  is_irrational\n",
      " |  \n",
      " |  is_negative\n",
      " |  \n",
      " |  is_noninteger\n",
      " |  \n",
      " |  is_nonnegative\n",
      " |  \n",
      " |  is_nonpositive\n",
      " |  \n",
      " |  is_nonzero\n",
      " |  \n",
      " |  is_odd\n",
      " |  \n",
      " |  is_polar\n",
      " |  \n",
      " |  is_positive\n",
      " |  \n",
      " |  is_prime\n",
      " |  \n",
      " |  is_rational\n",
      " |  \n",
      " |  is_real\n",
      " |  \n",
      " |  is_transcendental\n",
      " |  \n",
      " |  is_zero\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Data and other attributes inherited from sympy.core.basic.Basic:\n",
      " |  \n",
      " |  __annotations__ = {'_args': 'tuple[Basic, ...]', '_mhash': 'int | None...\n",
      " |  \n",
      " |  is_Add = False\n",
      " |  \n",
      " |  is_AlgebraicNumber = False\n",
      " |  \n",
      " |  is_Atom = False\n",
      " |  \n",
      " |  is_Boolean = False\n",
      " |  \n",
      " |  is_Derivative = False\n",
      " |  \n",
      " |  is_Dummy = False\n",
      " |  \n",
      " |  is_Equality = False\n",
      " |  \n",
      " |  is_Float = False\n",
      " |  \n",
      " |  is_Function = False\n",
      " |  \n",
      " |  is_Indexed = False\n",
      " |  \n",
      " |  is_Integer = False\n",
      " |  \n",
      " |  is_MatAdd = False\n",
      " |  \n",
      " |  is_MatMul = False\n",
      " |  \n",
      " |  is_Matrix = False\n",
      " |  \n",
      " |  is_Mul = False\n",
      " |  \n",
      " |  is_Not = False\n",
      " |  \n",
      " |  is_Number = False\n",
      " |  \n",
      " |  is_NumberSymbol = False\n",
      " |  \n",
      " |  is_Order = False\n",
      " |  \n",
      " |  is_Piecewise = False\n",
      " |  \n",
      " |  is_Point = False\n",
      " |  \n",
      " |  is_Poly = False\n",
      " |  \n",
      " |  is_Pow = False\n",
      " |  \n",
      " |  is_Rational = False\n",
      " |  \n",
      " |  is_Relational = False\n",
      " |  \n",
      " |  is_Symbol = False\n",
      " |  \n",
      " |  is_Vector = False\n",
      " |  \n",
      " |  is_Wild = False\n",
      " |  \n",
      " |  is_symbol = False\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Methods inherited from sympy.core.evalf.EvalfMixin:\n",
      " |  \n",
      " |  evalf(self, n=15, subs=None, maxn=100, chop=False, strict=False, quad=None, verbose=False)\n",
      " |      Evaluate the given formula to an accuracy of *n* digits.\n",
      " |      \n",
      " |      Parameters\n",
      " |      ==========\n",
      " |      \n",
      " |      subs : dict, optional\n",
      " |          Substitute numerical values for symbols, e.g.\n",
      " |          ``subs={x:3, y:1+pi}``. The substitutions must be given as a\n",
      " |          dictionary.\n",
      " |      \n",
      " |      maxn : int, optional\n",
      " |          Allow a maximum temporary working precision of maxn digits.\n",
      " |      \n",
      " |      chop : bool or number, optional\n",
      " |          Specifies how to replace tiny real or imaginary parts in\n",
      " |          subresults by exact zeros.\n",
      " |      \n",
      " |          When ``True`` the chop value defaults to standard precision.\n",
      " |      \n",
      " |          Otherwise the chop value is used to determine the\n",
      " |          magnitude of \"small\" for purposes of chopping.\n",
      " |      \n",
      " |          >>> from sympy import N\n",
      " |          >>> x = 1e-4\n",
      " |          >>> N(x, chop=True)\n",
      " |          0.000100000000000000\n",
      " |          >>> N(x, chop=1e-5)\n",
      " |          0.000100000000000000\n",
      " |          >>> N(x, chop=1e-4)\n",
      " |          0\n",
      " |      \n",
      " |      strict : bool, optional\n",
      " |          Raise ``PrecisionExhausted`` if any subresult fails to\n",
      " |          evaluate to full accuracy, given the available maxprec.\n",
      " |      \n",
      " |      quad : str, optional\n",
      " |          Choose algorithm for numerical quadrature. By default,\n",
      " |          tanh-sinh quadrature is used. For oscillatory\n",
      " |          integrals on an infinite interval, try ``quad='osc'``.\n",
      " |      \n",
      " |      verbose : bool, optional\n",
      " |          Print debug information.\n",
      " |      \n",
      " |      Notes\n",
      " |      =====\n",
      " |      \n",
      " |      When Floats are naively substituted into an expression,\n",
      " |      precision errors may adversely affect the result. For example,\n",
      " |      adding 1e16 (a Float) to 1 will truncate to 1e16; if 1e16 is\n",
      " |      then subtracted, the result will be 0.\n",
      " |      That is exactly what happens in the following:\n",
      " |      \n",
      " |      >>> from sympy.abc import x, y, z\n",
      " |      >>> values = {x: 1e16, y: 1, z: 1e16}\n",
      " |      >>> (x + y - z).subs(values)\n",
      " |      0\n",
      " |      \n",
      " |      Using the subs argument for evalf is the accurate way to\n",
      " |      evaluate such an expression:\n",
      " |      \n",
      " |      >>> (x + y - z).evalf(subs=values)\n",
      " |      1.00000000000000\n",
      " |  \n",
      " |  n = evalf(self, n=15, subs=None, maxn=100, chop=False, strict=False, quad=None, verbose=False)\n",
      "\n"
     ]
    }
   ],
   "source": [
    "help(Triangle)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "05d019d2",
   "metadata": {},
   "outputs": [],
   "source": [
    "c=Circle(Point(2,0),sqrt(5))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "746b60d3",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle x^{2} - 4 x + y^{2} - 1$"
      ],
      "text/plain": [
       "x**2 - 4*x + y**2 - 1"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "expand(c.equation())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "id": "d96e8db8",
   "metadata": {},
   "outputs": [],
   "source": [
    "Q=Point(0,-2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "id": "aff4dfb8",
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[Line2D(Point2D(0, -2), Point2D(3/4 - sqrt(15)/4, -5/4 + sqrt(15)/4)),\n",
       " Line2D(Point2D(0, -2), Point2D(3/4 + sqrt(15)/4, -5/4 - sqrt(15)/4))]"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "c.tangent_lines(Q)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "44415282",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-4 - sqrt(15)\n",
      "-4 + sqrt(15)\n"
     ]
    }
   ],
   "source": [
    "for l in _:\n",
    "    print(l.slope)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "28a1631b",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\operatorname{Point2D}\\left(2, 0\\right)$"
      ],
      "text/plain": [
       "Point2D(2, 0)"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "c.center"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "id": "b33155be",
   "metadata": {},
   "outputs": [],
   "source": [
    "para=Parabola(Point(0,S(1)/4),Line(y+S(1)/4))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "id": "fc6d398c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle - x^{2} + y$"
      ],
      "text/plain": [
       "-x**2 + y"
      ]
     },
     "execution_count": 44,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "para.equation()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "id": "5fcb0be6",
   "metadata": {},
   "outputs": [],
   "source": [
    "A=Point(1,1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "id": "a664f535",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 46,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A in para"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "id": "2839ab75",
   "metadata": {},
   "outputs": [],
   "source": [
    "B = Point(0,-1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 49,
   "id": "f6270592",
   "metadata": {},
   "outputs": [],
   "source": [
    "k = symbols(\"k\",real=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 50,
   "id": "9ecf87c2",
   "metadata": {},
   "outputs": [],
   "source": [
    "l=Line(B,slope=k)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 51,
   "id": "0a0d741e",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle - k x + y + 1$"
      ],
      "text/plain": [
       "-k*x + y + 1"
      ]
     },
     "execution_count": 51,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "l.equation()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "id": "bacbcfdb",
   "metadata": {},
   "outputs": [],
   "source": [
    "P,Q=Intersection(l,para)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 53,
   "id": "b1cd906a",
   "metadata": {},
   "outputs": [],
   "source": [
    "line_AB=Line(A,B)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 54,
   "id": "e222059f",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left\\{\\operatorname{Point2D}\\left(1, 1\\right)\\right\\}$"
      ],
      "text/plain": [
       "{Point2D(1, 1)}"
      ]
     },
     "execution_count": 54,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "Intersection(line_AB,para)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 55,
   "id": "cf092c7e",
   "metadata": {},
   "outputs": [],
   "source": [
    "O=Point(0,0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 60,
   "id": "409ff0d7",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\frac{\\sqrt{k \\left(k^{3} - k^{2} \\sqrt{k^{2} - 4} - 3 k + \\sqrt{k^{2} - 4}\\right)} \\sqrt{k \\left(k^{3} + k^{2} \\sqrt{k^{2} - 4} - 3 k - \\sqrt{k^{2} - 4}\\right)}}{2}$"
      ],
      "text/plain": [
       "sqrt(k*(k**3 - k**2*sqrt(k**2 - 4) - 3*k + sqrt(k**2 - 4)))*sqrt(k*(k**3 + k**2*sqrt(k**2 - 4) - 3*k - sqrt(k**2 - 4)))/2"
      ]
     },
     "execution_count": 60,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "simplify(O.distance(P)*O.distance(Q),force=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 57,
   "id": "adf2ae48",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle k^{2}$"
      ],
      "text/plain": [
       "k**2"
      ]
     },
     "execution_count": 57,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "simplify((_)**2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 58,
   "id": "7bf2bdd2",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\frac{\\left(k^{2} + 1\\right) \\sqrt{k^{2} - k \\sqrt{k^{2} - 4} - 2} \\sqrt{k^{2} + k \\sqrt{k^{2} - 4} - 2}}{2}$"
      ],
      "text/plain": [
       "(k**2 + 1)*sqrt(k**2 - k*sqrt(k**2 - 4) - 2)*sqrt(k**2 + k*sqrt(k**2 - 4) - 2)/2"
      ]
     },
     "execution_count": 58,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "factor(simplify(B.distance(P)*B.distance(Q)))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 59,
   "id": "995f14ac",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle k^{4} + 2 k^{2} + 1$"
      ],
      "text/plain": [
       "k**4 + 2*k**2 + 1"
      ]
     },
     "execution_count": 59,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "simplify((_)**2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "id": "ed1c15c9",
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Help on class Hyperbola in module quadratic_function.hyperbola:\n",
      "\n",
      "class Hyperbola(sympy.geometry.entity.GeometrySet)\n",
      " |  Hyperbola(center=None, real=None, imaginary=None, eccentricity=None, slope=None, **kwargs)\n",
      " |  \n",
      " |  An hyperbolic GeometryEntity.\n",
      " |  \n",
      " |  Parameters\n",
      " |  ==========\n",
      " |  \n",
      " |  center : Point, optional\n",
      " |      Default value is Point(0, 0)\n",
      " |  real : number or SymPy expression, optional\n",
      " |  imaginary : number or SymPy expression, optional\n",
      " |  eccentricity : number or SymPy expression, optional\n",
      " |      Two of `real`, `imaginary` and `eccentricity` must be supplied to\n",
      " |      create an Hyperbola. The third is derived from the two supplied.\n",
      " |  slope : number or SymPy expression, optional\n",
      " |      if the hyperbola's real radius is not on the x-axis,the slope should use.\n",
      " |  \n",
      " |  Attributes\n",
      " |  ==========\n",
      " |  \n",
      " |  center\n",
      " |  real\n",
      " |  imaginary\n",
      " |  circumference\n",
      " |  eccentricity\n",
      " |  periapsis\n",
      " |  apoapsis\n",
      " |  focus_distance\n",
      " |  foci\n",
      " |  \n",
      " |  Raises\n",
      " |  ======\n",
      " |  \n",
      " |  GeometryError\n",
      " |      When `real`, `imaginary` and `eccentricity` are incorrectly supplied\n",
      " |      as parameters.\n",
      " |  TypeError\n",
      " |      When `center` is not a Point.\n",
      " |  \n",
      " |  Notes\n",
      " |  -----\n",
      " |  Constructed from a center and two radii, the first being the horizontal\n",
      " |  radius (along the x-axis) and the second being the vertical radius (along\n",
      " |  the y-axis).\n",
      " |  \n",
      " |  When symbolic value for real and imaginary are used, any calculation that\n",
      " |  refers to the foci or the real or imaginary axis will assume that the hyperbola\n",
      " |  has its real radius on the x-axis. If this is not true then the slope is necessary.\n",
      " |  \n",
      " |  Examples\n",
      " |  ========\n",
      " |  \n",
      " |  >>> from sympy import Hyperbola, Point, Rational\n",
      " |  >>> e1 = Hyperbola(Point(0, 0), 5, 1)\n",
      " |  >>> e1.real, e1.imaginary\n",
      " |  (5, 1)\n",
      " |  >>> e2 = Hyperbola(Point(3, 1), real=3, eccentricity=Rational(5, 3))\n",
      " |  >>> e2\n",
      " |  Hyperbola(Point2D(3, 1), 3, 4, 0)\n",
      " |  \n",
      " |  Method resolution order:\n",
      " |      Hyperbola\n",
      " |      sympy.geometry.entity.GeometrySet\n",
      " |      sympy.geometry.entity.GeometryEntity\n",
      " |      sympy.sets.sets.Set\n",
      " |      sympy.core.basic.Basic\n",
      " |      sympy.printing.defaults.Printable\n",
      " |      sympy.core.evalf.EvalfMixin\n",
      " |      builtins.object\n",
      " |  \n",
      " |  Methods defined here:\n",
      " |  \n",
      " |  __contains__(self, o)\n",
      " |      Subclasses should implement this method for anything more complex than equality.\n",
      " |  \n",
      " |  __eq__(self, o)\n",
      " |      Is the other GeometryEntity the same as this hyperbola?\n",
      " |  \n",
      " |  __hash__(self)\n",
      " |      Return hash(self).\n",
      " |  \n",
      " |  arbitrary_point(self, parameter='t')\n",
      " |      A parameterized point on the hyperbola.\n",
      " |      \n",
      " |      Parameters\n",
      " |      ==========\n",
      " |      \n",
      " |      parameter : str, optional\n",
      " |          Default value is 't'.\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      arbitrary_point : Point\n",
      " |      \n",
      " |      Raises\n",
      " |      ======\n",
      " |      \n",
      " |      ValueError\n",
      " |          When `parameter` already appears in the functions.\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      sympy.geometry.point.Point\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Point, Hyperbola\n",
      " |      >>> e1 = Hyperbola(Point(0, 0), 3, 2)\n",
      " |      >>> e1.arbitrary_point()\n",
      " |      Point2D(3/cos(t), 2*tan(t))\n",
      " |  \n",
      " |  encloses_point(self, p)\n",
      " |      Return True if p is enclosed by (is inside of) self.\n",
      " |      \n",
      " |      Notes\n",
      " |      -----\n",
      " |      Being on the border of self is considered False.\n",
      " |      \n",
      " |      Parameters\n",
      " |      ==========\n",
      " |      \n",
      " |      p : Point\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      encloses_point : True, False or None\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      sympy.geometry.point.Point\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Hyperbola, S\n",
      " |      >>> from sympy.abc import t\n",
      " |      >>> e = Hyperbola((0, 0), 3, 2)\n",
      " |      >>> e.encloses_point((0, 0))\n",
      " |      False\n",
      " |      >>> e.encloses_point(e.arbitrary_point(t).subs(t, S.Half))\n",
      " |      False\n",
      " |      >>> e.encloses_point((4, 0))\n",
      " |      True\n",
      " |  \n",
      " |  equation(self, x='x', y='y', _slope=None)\n",
      " |      Returns the equation of an hyperbola aligned with the x and y axes;\n",
      " |      when slope is given, the equation returned corresponds to an hyperbola\n",
      " |      with a real axis having that slope.\n",
      " |      \n",
      " |      Parameters\n",
      " |      ==========\n",
      " |      \n",
      " |      x : str, optional\n",
      " |          Label for the x-axis. Default value is 'x'.\n",
      " |      y : str, optional\n",
      " |          Label for the y-axis. Default value is 'y'.\n",
      " |      _slope : Expr, optional\n",
      " |              The slope of the real axis. Ignored when 'None'.\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      equation : SymPy expression\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      arbitrary_point : Returns parameterized point on hyperbola\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Point, Hyperbola, pi\n",
      " |      >>> from sympy.abc import x, y\n",
      " |      >>> e1 = Hyperbola(Point(1, 0), 3, 2)\n",
      " |      >>> eq1 = e1.equation(x, y); eq1\n",
      " |      -y**2/4 + (x - 1)**2/9 - 1\n",
      " |      >>> eq2 = e1.equation(x, y, self.slope=1); eq2\n",
      " |      -(-x + y + 1)**2/8 + (x + y - 1)**2/18 - 1\n",
      " |      \n",
      " |      A point on e1 satisfies eq1. Let's use one on the x-axis:\n",
      " |      \n",
      " |      >>> p1 = e1.center + Point(e1.real, 0)\n",
      " |      >>> assert eq1.subs(x, p1.x).subs(y, p1.y) == 0\n",
      " |      \n",
      " |      When rotated the same as the rotated hyperbola, about the center\n",
      " |      point of the hyperbola, it will satisfy the rotated hyperbola's\n",
      " |      equation, too:\n",
      " |      \n",
      " |      >>> r1 = p1.rotate(pi/4, e1.center)\n",
      " |      >>> assert eq2.subs(x, r1.x).subs(y, r1.y) == 0\n",
      " |      \n",
      " |      References\n",
      " |      ==========\n",
      " |      \n",
      " |      .. [1] https://math.stackexchange.com/questions/108270/what-is-the-equation-of-an-hyperbola-that-is-not-aligned-with-the-axis\n",
      " |      .. [2] https://en.wikipedia.org/wiki/Hyperbola#Shifted_hyperbola\n",
      " |  \n",
      " |  evolute(self, x='x', y='y')\n",
      " |      The equation of evolute of the hyperbola.\n",
      " |      \n",
      " |      Parameters\n",
      " |      ==========\n",
      " |      \n",
      " |      x : str, optional\n",
      " |          Label for the x-axis. Default value is 'x'.\n",
      " |      y : str, optional\n",
      " |          Label for the y-axis. Default value is 'y'.\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      equation : SymPy expression\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Point, Hyperbola\n",
      " |      >>> e1 = Hyperbola(Point(1, 0), 3, 2)\n",
      " |      >>> e1.evolute()\n",
      " |      2**(2/3)*y**(2/3) + (3*x - 3)**(2/3) - 5**(2/3)\n",
      " |  \n",
      " |  intersection(self, o)\n",
      " |      The intersection of this hyperbola and another geometrical entity\n",
      " |      `o`.\n",
      " |      \n",
      " |      Parameters\n",
      " |      ==========\n",
      " |      \n",
      " |      o : GeometryEntity\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      intersection : list of GeometryEntity objects\n",
      " |      \n",
      " |      Notes\n",
      " |      -----\n",
      " |      Currently supports intersections with Point, Line, Segment, Ray,\n",
      " |      Circle and Hyperbola types.\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      sympy.geometry.entity.GeometryEntity\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Hyperbola, Point, Line\n",
      " |      >>> e = Hyperbola(Point(0, 0), 5, 7)\n",
      " |      >>> e.intersection(Point(0, 0))\n",
      " |      []\n",
      " |      >>> e.intersection(Point(5, 0))\n",
      " |      [Point2D(5, 0)]\n",
      " |      >>> e.intersection(Line(Point(0,0), Point(0, 1)))\n",
      " |      []\n",
      " |      >>> e.intersection(Line(Point(5,0), Point(5, 1)))\n",
      " |      [Point2D(5, 0)]\n",
      " |      >>> e.intersection(Line(Point(6,0), Point(6, 1)))\n",
      " |      []\n",
      " |      >>> e = Hyperbola(Point(-1, 0), 4, 3)\n",
      " |      >>> e.intersection(Hyperbola(Point(1, 0), 4, 3))\n",
      " |      [Point2D(0, -3*sqrt(15)/4), Point2D(0, 3*sqrt(15)/4)]\n",
      " |      >>> e.intersection(Hyperbola(Point(5, 0), 4, 3))\n",
      " |      [Point2D(2, -3*sqrt(7)/4), Point2D(2, 3*sqrt(7)/4)]\n",
      " |      >>> e.intersection(Hyperbola(Point(100500, 0), 4, 3))\n",
      " |      []\n",
      " |      >>> e.intersection(Hyperbola(Point(0, 0), 3, 4))\n",
      " |      [Point2D(3, 0), Point2D(-363/175, -48*sqrt(111)/175), Point2D(-363/175, 48*sqrt(111)/175)]\n",
      " |      >>> e.intersection(Hyperbola(Point(-1, 0), 3, 4))\n",
      " |      [Point2D(-17/5, -12/5), Point2D(-17/5, 12/5), Point2D(7/5, -12/5), Point2D(7/5, 12/5)]\n",
      " |  \n",
      " |  is_tangent(self, o)\n",
      " |      Is `o` tangent to the hyperbola?\n",
      " |      \n",
      " |      Parameters\n",
      " |      ==========\n",
      " |      \n",
      " |      o : GeometryEntity\n",
      " |          An Hyperbola, LinearEntity or Polygon\n",
      " |      \n",
      " |      Raises\n",
      " |      ======\n",
      " |      \n",
      " |      NotImplementedError\n",
      " |          When the wrong type of argument is supplied.\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      is_tangent: boolean\n",
      " |          True if o is tangent to the hyperbola, False otherwise.\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      tangent_lines\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Point, Hyperbola, Line\n",
      " |      >>> p0, p1, p2 = Point(0, 0), Point(3, 0), Point(3, 3)\n",
      " |      >>> e1 = Hyperbola(p0, 3, 2)\n",
      " |      >>> l1 = Line(p1, p2)\n",
      " |      >>> e1.is_tangent(l1)\n",
      " |      True\n",
      " |  \n",
      " |  normal_lines(self, p, prec=None)\n",
      " |      Normal lines between `p` and the hyperbola.\n",
      " |      \n",
      " |      Parameters\n",
      " |      ==========\n",
      " |      \n",
      " |      p : Point\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      normal_lines : list with 1, 2 or 4 Lines\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Point, Hyperbola\n",
      " |      >>> e = Hyperbola((0, 0), 2, 3)\n",
      " |      >>> c = e.center\n",
      " |      >>> e.normal_lines(c + Point(1, 0))\n",
      " |      [Line2D(Point2D(0, 0), Point2D(1, 0))]\n",
      " |      >>> e.normal_lines(c)\n",
      " |      [Line2D(Point2D(0, 0), Point2D(0, 1)), Line2D(Point2D(0, 0), Point2D(1, 0))]\n",
      " |      \n",
      " |      Off-axis points require the solution of a quartic equation. This\n",
      " |      often leads to very large expressions that may be of little practical\n",
      " |      use. An approximate solution of `prec` digits can be obtained by\n",
      " |      passing in the desired value:\n",
      " |      \n",
      " |      >>> e.normal_lines((3, 3), prec=2)\n",
      " |      [Line2D(Point2D(-0.81, -2.7), Point2D(0.19, -1.2)),\n",
      " |      Line2D(Point2D(1.5, -2.0), Point2D(2.5, -2.7))]\n",
      " |      \n",
      " |      Whereas the above solution has an operation count of 12, the exact\n",
      " |      solution has an operation count of 2020.\n",
      " |  \n",
      " |  plot_interval(self, parameter='t')\n",
      " |      The plot interval for the default geometric plot of the Hyperbola.\n",
      " |      \n",
      " |      Parameters\n",
      " |      ==========\n",
      " |      \n",
      " |      parameter : str, optional\n",
      " |          Default value is 't'.\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      plot_interval : list\n",
      " |          [parameter, lower_bound, upper_bound]\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Point, Hyperbola\n",
      " |      >>> e1 = Hyperbola(Point(0, 0), 3, 2)\n",
      " |      >>> e1.plot_interval()\n",
      " |      [t, -pi, pi]\n",
      " |  \n",
      " |  polar_second_moment_of_area(self)\n",
      " |      Returns the polar second moment of area of an Hyperbola\n",
      " |      \n",
      " |      It is a constituent of the second moment of area, linked through\n",
      " |      the perpendicular axis theorem. While the planar second moment of\n",
      " |      area describes an object's resistance to deflection (bending) when\n",
      " |      subjected to a force applied to a plane parallel to the central\n",
      " |      axis, the polar second moment of area describes an object's\n",
      " |      resistance to deflection when subjected to a moment applied in a\n",
      " |      plane perpendicular to the object's central axis (i.e. parallel to\n",
      " |      the cross-section)\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import symbols, Circle, Hyperbola\n",
      " |      >>> c = Circle((5, 5), 4)\n",
      " |      >>> c.polar_second_moment_of_area()\n",
      " |      128*pi\n",
      " |      >>> a, b = symbols('a, b')\n",
      " |      >>> e = Hyperbola((0, 0), a, b)\n",
      " |      >>> e.polar_second_moment_of_area()\n",
      " |      pi*a**3*b/4 + pi*a*b**3/4\n",
      " |      \n",
      " |      References\n",
      " |      ==========\n",
      " |      \n",
      " |      .. [1] https://en.wikipedia.org/wiki/Polar_moment_of_inertia\n",
      " |  \n",
      " |  random_point(self, seed=None)\n",
      " |      A random point on the hyperbola.\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      point : Point\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Point, Hyperbola\n",
      " |      >>> e1 = Hyperbola(Point(0, 0), 2, 3)\n",
      " |      >>> e1.random_point() # gives some random point\n",
      " |      Point2D(...)\n",
      " |      >>> p1 = e1.random_point(seed=0); p1.n(2)\n",
      " |      Point2D(2.9, -3.2)\n",
      " |      \n",
      " |      Notes\n",
      " |      =====\n",
      " |      \n",
      " |      When creating a random point, one may simply replace the\n",
      " |      parameter with a random number. When doing so, however, the\n",
      " |      random number should be made a Rational or else the point\n",
      " |      may not test as being in the hyperbola:\n",
      " |      \n",
      " |      >>> from sympy.abc import t\n",
      " |      >>> from sympy import Rational\n",
      " |      >>> arb = e1.arbitrary_point(t); arb\n",
      " |      Point2D(3*cos(t), 2*sin(t))\n",
      " |      >>> arb.subs(t, .1) in e1\n",
      " |      False\n",
      " |      >>> arb.subs(t, Rational(.1)) in e1\n",
      " |      True\n",
      " |      >>> arb.subs(t, Rational('.1')) in e1\n",
      " |      True\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      sympy.geometry.point.Point\n",
      " |      arbitrary_point : Returns parameterized point on hyperbola\n",
      " |  \n",
      " |  reflect(self, line)\n",
      " |      Override GeometryEntity.reflect since the radius\n",
      " |      is not a GeometryEntity.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Circle, Line\n",
      " |      >>> Circle((0, 1), 1).reflect(Line((0, 0), (1, 1)))\n",
      " |      Circle(Point2D(1, 0), -1)\n",
      " |      >>> from sympy import Hyperbola, Line, Point\n",
      " |      >>> Hyperbola(Point(3, 4), 1, 3).reflect(Line(Point(0, -4), Point(5, 0)))\n",
      " |      Traceback (most recent call last):\n",
      " |      ...\n",
      " |      NotImplementedError:\n",
      " |      General Hyperbola is not supported but the equation of the reflected\n",
      " |      Hyperbola is given by the zeros of: f(x, y) = (9*x/41 + 40*y/41 +\n",
      " |      37/41)**2 + (40*x/123 - 3*y/41 - 364/123)**2 - 1\n",
      " |      \n",
      " |      Notes\n",
      " |      =====\n",
      " |      \n",
      " |      Until the general hyperbola (with no axis parallel to the x-axis) is\n",
      " |      supported a NotImplemented error is raised and the equation whose\n",
      " |      zeros define the rotated hyperbola is given.\n",
      " |  \n",
      " |  rotate(self, angle=0, pt=None)\n",
      " |      Rotate ``angle`` radians counterclockwise about Point ``pt``.\n",
      " |      \n",
      " |      Note: since the general hyperbola is not supported, only rotations that\n",
      " |      are integer multiples of pi/2 are allowed.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Hyperbola, pi\n",
      " |      >>> Hyperbola((1, 0), 2, 1).rotate(pi/2)\n",
      " |      Hyperbola(Point2D(0, 1), 1, 2)\n",
      " |      >>> Hyperbola((1, 0), 2, 1).rotate(pi)\n",
      " |      Hyperbola(Point2D(-1, 0), 2, 1)\n",
      " |  \n",
      " |  scale(self, x=1, y=1, pt=None)\n",
      " |      Override GeometryEntity.scale since it is the real and imaginary\n",
      " |      axes which must be scaled and they are not GeometryEntities.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Hyperbola\n",
      " |      >>> Hyperbola((0, 0), 2, 1).scale(2, 4)\n",
      " |      Circle(Point2D(0, 0), 4)\n",
      " |      >>> Hyperbola((0, 0), 2, 1).scale(2)\n",
      " |      Hyperbola(Point2D(0, 0), 4, 1)\n",
      " |  \n",
      " |  second_moment_of_area(self, point=None)\n",
      " |      Returns the second moment and product moment area of an hyperbola.\n",
      " |      \n",
      " |      Parameters\n",
      " |      ==========\n",
      " |      \n",
      " |      point : Point, two-tuple of sympifiable objects, or None(default=None)\n",
      " |          point is the point about which second moment of area is to be found.\n",
      " |          If \"point=None\" it will be calculated about the axis passing through the\n",
      " |          centroid of the hyperbola.\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      I_xx, I_yy, I_xy : number or SymPy expression\n",
      " |          I_xx, I_yy are second moment of area of an ellise.\n",
      " |          I_xy is product moment of area of an hyperbola.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Point, Hyperbola\n",
      " |      >>> p1 = Point(0, 0)\n",
      " |      >>> e1 = Hyperbola(p1, 3, 1)\n",
      " |      >>> e1.second_moment_of_area()\n",
      " |      (3*pi/4, 27*pi/4, 0)\n",
      " |      \n",
      " |      References\n",
      " |      ==========\n",
      " |      \n",
      " |      .. [1] https://en.wikipedia.org/wiki/List_of_second_moments_of_area\n",
      " |  \n",
      " |  section_modulus(self, point=None)\n",
      " |      Returns a tuple with the section modulus of an hyperbola\n",
      " |      \n",
      " |      Section modulus is a geometric property of an hyperbola defined as the\n",
      " |      ratio of second moment of area to the distance of the extreme end of\n",
      " |      the hyperbola from the centroidal axis.\n",
      " |      \n",
      " |      Parameters\n",
      " |      ==========\n",
      " |      \n",
      " |      point : Point, two-tuple of sympifyable objects, or None(default=None)\n",
      " |          point is the point at which section modulus is to be found.\n",
      " |          If \"point=None\" section modulus will be calculated for the\n",
      " |          point farthest from the centroidal axis of the hyperbola.\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      S_x, S_y: numbers or SymPy expressions\n",
      " |                S_x is the section modulus with respect to the x-axis\n",
      " |                S_y is the section modulus with respect to the y-axis\n",
      " |                A negative sign indicates that the section modulus is\n",
      " |                determined for a point below the centroidal axis.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Symbol, Hyperbola, Circle, Point2D\n",
      " |      >>> d = Symbol('d', positive=True)\n",
      " |      >>> c = Circle((0, 0), d/2)\n",
      " |      >>> c.section_modulus()\n",
      " |      (pi*d**3/32, pi*d**3/32)\n",
      " |      >>> e = Hyperbola(Point2D(0, 0), 2, 4)\n",
      " |      >>> e.section_modulus()\n",
      " |      (8*pi, 4*pi)\n",
      " |      >>> e.section_modulus((2, 2))\n",
      " |      (16*pi, 4*pi)\n",
      " |      \n",
      " |      References\n",
      " |      ==========\n",
      " |      \n",
      " |      .. [1] https://en.wikipedia.org/wiki/Section_modulus\n",
      " |  \n",
      " |  tangent_lines(self, p)\n",
      " |      Tangent lines between `p` and the hyperbola.\n",
      " |      \n",
      " |      If `p` is on the hyperbola, returns the tangent line through point `p`.\n",
      " |      Otherwise, returns the tangent line(s) from `p` to the hyperbola, or\n",
      " |      None if no tangent line is possible (e.g., `p` inside hyperbola).\n",
      " |      \n",
      " |      Parameters\n",
      " |      ==========\n",
      " |      \n",
      " |      p : Point\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      tangent_lines : list with 1 or 2 Lines\n",
      " |      \n",
      " |      Raises\n",
      " |      ======\n",
      " |      \n",
      " |      NotImplementedError\n",
      " |          Can only find tangent lines for a point, `p`, on the hyperbola.\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      sympy.geometry.point.Point, sympy.geometry.line.Line\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Point, Hyperbola\n",
      " |      >>> e1 = Hyperbola(Point(0, 0), 3, 2)\n",
      " |      >>> e1.tangent_lines(Point(3, 0))\n",
      " |      [Line2D(Point2D(3, 0), Point2D(3, -12))]\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Static methods defined here:\n",
      " |  \n",
      " |  __new__(cls, center=None, real=None, imaginary=None, eccentricity=None, slope=None, **kwargs)\n",
      " |      Create and return a new object.  See help(type) for accurate signature.\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Readonly properties defined here:\n",
      " |  \n",
      " |  ambient_dimension\n",
      " |      What is the dimension of the space that the object is contained in?\n",
      " |  \n",
      " |  apoapsis\n",
      " |      The apoapsis of the hyperbola.\n",
      " |      \n",
      " |      The shortest distance between the focus and the longer contour.\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      apoapsis : number or SymPy expression\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      periapsis : Returns shortest distance between foci and the lear contour\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Point, Hyperbola\n",
      " |      >>> p1 = Point(0, 0)\n",
      " |      >>> e1 = Hyperbola(p1, 3, 1)\n",
      " |      >>> e1.apoapsis\n",
      " |      3 + sqrt(10)\n",
      " |  \n",
      " |  asymptote\n",
      " |      Returns a the two asymptote of the hyperbola in a list.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Hyperbola, Point, symbols\n",
      " |      >>> c = Point(1, 2)\n",
      " |      >>> Hyperbola(c, 8, 7).asymptote\n",
      " |      [Line2D(Point2D(1, 2), Point2D(-8, 7)), Line2D(Point2D(1, 2), Point2D(8, 7))]\n",
      " |      >>> a, b = symbols('a b')\n",
      " |      >>> Hyperbola(c, a, b).asymptote\n",
      " |      [Line2D(Point2D(1, 2), Point2D(-a, b)), Line2D(Point2D(1, 2), Point2D(a, b))]\n",
      " |  \n",
      " |  center\n",
      " |      The center of the hyperbola.\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      center : Point\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      sympy.geometry.point.Point\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Point, Hyperbola\n",
      " |      >>> p1 = Point(0, 0)\n",
      " |      >>> e1 = Hyperbola(p1, 3, 1)\n",
      " |      >>> e1.center\n",
      " |      Point2D(0, 0)\n",
      " |  \n",
      " |  eccentricity\n",
      " |      The eccentricity of the hyperbola.\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      eccentricity : number\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Point, Hyperbola, sqrt\n",
      " |      >>> p1 = Point(0, 0)\n",
      " |      >>> e1 = Hyperbola(p1, 3, sqrt(2))\n",
      " |      >>> e1.eccentricity\n",
      " |      sqrt(11)/3\n",
      " |  \n",
      " |  foci\n",
      " |      The foci of the hyperbola.\n",
      " |      \n",
      " |      Notes\n",
      " |      -----\n",
      " |      The foci can only be calculated if the real/imaginary axes are known.\n",
      " |      \n",
      " |      Raises\n",
      " |      ======\n",
      " |      \n",
      " |      ValueError\n",
      " |          When the real and imaginary axis cannot be determined.\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      sympy.geometry.point.Point\n",
      " |      focus_distance : Returns the distance between focus and center\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Point, Hyperbola\n",
      " |      >>> p1 = Point(0, 0)\n",
      " |      >>> e1 = Hyperbola(p1, 3, 1)\n",
      " |      >>> e1.foci\n",
      " |      (Point2D(-sqrt(10), 0), Point2D(sqrt(10), 0))\n",
      " |  \n",
      " |  focus_distance\n",
      " |      The focal distance of the hyperbola.\n",
      " |      \n",
      " |      The distance between the center and one focus.\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      focus_distance : number\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      foci\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Point, Hyperbola\n",
      " |      >>> p1 = Point(0, 0)\n",
      " |      >>> e1 = Hyperbola(p1, 3, 1)\n",
      " |      >>> e1.focus_distance\n",
      " |      sqrt(10)\n",
      " |  \n",
      " |  imaginary\n",
      " |      The vertical radius of the hyperbola.\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      imaginary : number\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      real, imaginary\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Point, Hyperbola\n",
      " |      >>> p1 = Point(0, 0)\n",
      " |      >>> e1 = Hyperbola(p1, 3, 1)\n",
      " |      >>> e1.imaginary\n",
      " |      1\n",
      " |  \n",
      " |  periapsis\n",
      " |      The periapsis of the hyperbola.\n",
      " |      \n",
      " |      The shortest distance between the focus and the lear contour.\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      periapsis : number\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      apoapsis : Returns shottest distance between focus and the longer  contour\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Point, Hyperbola\n",
      " |      >>> p1 = Point(0, 0)\n",
      " |      >>> e1 = Hyperbola(p1, 3, 1)\n",
      " |      >>> e1.periapsis\n",
      " |      3 - sqrt(10)\n",
      " |  \n",
      " |  real\n",
      " |      The real axis of the hyperbola.\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      real : number\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      imaginary, real, imaginary\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Point, Hyperbola\n",
      " |      >>> p1 = Point(0, 0)\n",
      " |      >>> e1 = Hyperbola(p1, 3, 1)\n",
      " |      >>> e1.real\n",
      " |      3\n",
      " |  \n",
      " |  semilatus_rectum\n",
      " |      Calculates the semi-latus rectum of the Hyperbola.\n",
      " |      \n",
      " |      Semi-latus rectum is defined as one half of the chord through a\n",
      " |      focus parallel to the conic section directrix of a conic section.\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      semilatus_rectum : number\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      apoapsis : Returns greatest distance between focus and contour\n",
      " |      \n",
      " |      periapsis : The shortest distance between the focus and the contour\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Point, Hyperbola\n",
      " |      >>> p1 = Point(0, 0)\n",
      " |      >>> e1 = Hyperbola(p1, 3, 1)\n",
      " |      >>> e1.semilatus_rectum\n",
      " |      1/3\n",
      " |      \n",
      " |      References\n",
      " |      ==========\n",
      " |      \n",
      " |      .. [1] https://mathworld.wolfram.com/SemilatusRectum.html\n",
      " |      .. [2] https://en.wikipedia.org/wiki/Hyperbola#Semi-latus_rectum\n",
      " |  \n",
      " |  slope\n",
      " |      Returns the tangent of a angle which is real axis and x-axis.\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      slope : number\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> O=Point(0,0)\n",
      " |      >>> para=Parabola(O,3,4)\n",
      " |      >>> para.slope\n",
      " |      0\n",
      " |      >>> para=Parabola(O,3,3,1)\n",
      " |      >>> expand(para.equation())\n",
      " |      x*y - 9/2\n",
      " |      >>> para.slope\n",
      " |      1\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Data descriptors defined here:\n",
      " |  \n",
      " |  __dict__\n",
      " |      dictionary for instance variables (if defined)\n",
      " |  \n",
      " |  __weakref__\n",
      " |      list of weak references to the object (if defined)\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Data and other attributes defined here:\n",
      " |  \n",
      " |  default_assumptions = {}\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Methods inherited from sympy.geometry.entity.GeometryEntity:\n",
      " |  \n",
      " |  __cmp__(self, other)\n",
      " |      Comparison of two GeometryEntities.\n",
      " |  \n",
      " |  __getnewargs__(self)\n",
      " |      Returns a tuple that will be passed to __new__ on unpickling.\n",
      " |  \n",
      " |  __ne__(self, o)\n",
      " |      Test inequality of two geometrical entities.\n",
      " |  \n",
      " |  __radd__(self, a)\n",
      " |      Implementation of reverse add method.\n",
      " |  \n",
      " |  __repr__(self)\n",
      " |      String representation of a GeometryEntity that can be evaluated\n",
      " |      by sympy.\n",
      " |  \n",
      " |  __rmul__(self, a)\n",
      " |      Implementation of reverse multiplication method.\n",
      " |  \n",
      " |  __rsub__(self, a)\n",
      " |      Implementation of reverse subtraction method.\n",
      " |  \n",
      " |  __rtruediv__(self, a)\n",
      " |      Implementation of reverse division method.\n",
      " |  \n",
      " |  __str__(self)\n",
      " |      String representation of a GeometryEntity.\n",
      " |  \n",
      " |  encloses(self, o)\n",
      " |      Return True if o is inside (not on or outside) the boundaries of self.\n",
      " |      \n",
      " |      The object will be decomposed into Points and individual Entities need\n",
      " |      only define an encloses_point method for their class.\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      sympy.geometry.ellipse.Ellipse.encloses_point\n",
      " |      sympy.geometry.polygon.Polygon.encloses_point\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import RegularPolygon, Point, Polygon\n",
      " |      >>> t  = Polygon(*RegularPolygon(Point(0, 0), 1, 3).vertices)\n",
      " |      >>> t2 = Polygon(*RegularPolygon(Point(0, 0), 2, 3).vertices)\n",
      " |      >>> t2.encloses(t)\n",
      " |      True\n",
      " |      >>> t.encloses(t2)\n",
      " |      False\n",
      " |  \n",
      " |  equals(self, o)\n",
      " |  \n",
      " |  is_similar(self, other)\n",
      " |      Is this geometrical entity similar to another geometrical entity?\n",
      " |      \n",
      " |      Two entities are similar if a uniform scaling (enlarging or\n",
      " |      shrinking) of one of the entities will allow one to obtain the other.\n",
      " |      \n",
      " |      Notes\n",
      " |      =====\n",
      " |      \n",
      " |      This method is not intended to be used directly but rather\n",
      " |      through the `are_similar` function found in util.py.\n",
      " |      An entity is not required to implement this method.\n",
      " |      If two different types of entities can be similar, it is only\n",
      " |      required that one of them be able to determine this.\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      scale\n",
      " |  \n",
      " |  parameter_value(self, other, t)\n",
      " |      Return the parameter corresponding to the given point.\n",
      " |      Evaluating an arbitrary point of the entity at this parameter\n",
      " |      value will return the given point.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Line, Point\n",
      " |      >>> from sympy.abc import t\n",
      " |      >>> a = Point(0, 0)\n",
      " |      >>> b = Point(2, 2)\n",
      " |      >>> Line(a, b).parameter_value((1, 1), t)\n",
      " |      {t: 1/2}\n",
      " |      >>> Line(a, b).arbitrary_point(t).subs(_)\n",
      " |      Point2D(1, 1)\n",
      " |  \n",
      " |  translate(self, x=0, y=0)\n",
      " |      Shift the object by adding to the x,y-coordinates the values x and y.\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      rotate, scale\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import RegularPolygon, Point, Polygon\n",
      " |      >>> t = Polygon(*RegularPolygon(Point(0, 0), 1, 3).vertices)\n",
      " |      >>> t\n",
      " |      Triangle(Point2D(1, 0), Point2D(-1/2, sqrt(3)/2), Point2D(-1/2, -sqrt(3)/2))\n",
      " |      >>> t.translate(2)\n",
      " |      Triangle(Point2D(3, 0), Point2D(3/2, sqrt(3)/2), Point2D(3/2, -sqrt(3)/2))\n",
      " |      >>> t.translate(2, 2)\n",
      " |      Triangle(Point2D(3, 2), Point2D(3/2, sqrt(3)/2 + 2), Point2D(3/2, 2 - sqrt(3)/2))\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Readonly properties inherited from sympy.geometry.entity.GeometryEntity:\n",
      " |  \n",
      " |  bounds\n",
      " |      Return a tuple (xmin, ymin, xmax, ymax) representing the bounding\n",
      " |      rectangle for the geometric figure.\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Data and other attributes inherited from sympy.geometry.entity.GeometryEntity:\n",
      " |  \n",
      " |  __annotations__ = {'__slots__': 'tuple[str, ...]'}\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Methods inherited from sympy.sets.sets.Set:\n",
      " |  \n",
      " |  __add__(self, other)\n",
      " |  \n",
      " |  __and__(self, other)\n",
      " |  \n",
      " |  __mul__(self, other)\n",
      " |  \n",
      " |  __or__(self, other)\n",
      " |  \n",
      " |  __pow__(self, exp)\n",
      " |  \n",
      " |  __sub__(self, other)\n",
      " |  \n",
      " |  __xor__(self, other)\n",
      " |  \n",
      " |  complement(self, universe)\n",
      " |      The complement of 'self' w.r.t the given universe.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Interval, S\n",
      " |      >>> Interval(0, 1).complement(S.Reals)\n",
      " |      Union(Interval.open(-oo, 0), Interval.open(1, oo))\n",
      " |      \n",
      " |      >>> Interval(0, 1).complement(S.UniversalSet)\n",
      " |      Complement(UniversalSet, Interval(0, 1))\n",
      " |  \n",
      " |  contains(self, other)\n",
      " |      Returns a SymPy value indicating whether ``other`` is contained\n",
      " |      in ``self``: ``true`` if it is, ``false`` if it is not, else\n",
      " |      an unevaluated ``Contains`` expression (or, as in the case of\n",
      " |      ConditionSet and a union of FiniteSet/Intervals, an expression\n",
      " |      indicating the conditions for containment).\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Interval, S\n",
      " |      >>> from sympy.abc import x\n",
      " |      \n",
      " |      >>> Interval(0, 1).contains(0.5)\n",
      " |      True\n",
      " |      \n",
      " |      As a shortcut it is possible to use the ``in`` operator, but that\n",
      " |      will raise an error unless an affirmative true or false is not\n",
      " |      obtained.\n",
      " |      \n",
      " |      >>> Interval(0, 1).contains(x)\n",
      " |      (0 <= x) & (x <= 1)\n",
      " |      >>> x in Interval(0, 1)\n",
      " |      Traceback (most recent call last):\n",
      " |      ...\n",
      " |      TypeError: did not evaluate to a bool: None\n",
      " |      \n",
      " |      The result of 'in' is a bool, not a SymPy value\n",
      " |      \n",
      " |      >>> 1 in Interval(0, 2)\n",
      " |      True\n",
      " |      >>> _ is S.true\n",
      " |      False\n",
      " |  \n",
      " |  intersect(self, other)\n",
      " |      Returns the intersection of 'self' and 'other'.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Interval\n",
      " |      \n",
      " |      >>> Interval(1, 3).intersect(Interval(1, 2))\n",
      " |      Interval(1, 2)\n",
      " |      \n",
      " |      >>> from sympy import imageset, Lambda, symbols, S\n",
      " |      >>> n, m = symbols('n m')\n",
      " |      >>> a = imageset(Lambda(n, 2*n), S.Integers)\n",
      " |      >>> a.intersect(imageset(Lambda(m, 2*m + 1), S.Integers))\n",
      " |      EmptySet\n",
      " |  \n",
      " |  is_disjoint(self, other)\n",
      " |      Returns True if ``self`` and ``other`` are disjoint.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Interval\n",
      " |      >>> Interval(0, 2).is_disjoint(Interval(1, 2))\n",
      " |      False\n",
      " |      >>> Interval(0, 2).is_disjoint(Interval(3, 4))\n",
      " |      True\n",
      " |      \n",
      " |      References\n",
      " |      ==========\n",
      " |      \n",
      " |      .. [1] https://en.wikipedia.org/wiki/Disjoint_sets\n",
      " |  \n",
      " |  is_proper_subset(self, other)\n",
      " |      Returns True if ``self`` is a proper subset of ``other``.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Interval\n",
      " |      >>> Interval(0, 0.5).is_proper_subset(Interval(0, 1))\n",
      " |      True\n",
      " |      >>> Interval(0, 1).is_proper_subset(Interval(0, 1))\n",
      " |      False\n",
      " |  \n",
      " |  is_proper_superset(self, other)\n",
      " |      Returns True if ``self`` is a proper superset of ``other``.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Interval\n",
      " |      >>> Interval(0, 1).is_proper_superset(Interval(0, 0.5))\n",
      " |      True\n",
      " |      >>> Interval(0, 1).is_proper_superset(Interval(0, 1))\n",
      " |      False\n",
      " |  \n",
      " |  is_subset(self, other)\n",
      " |      Returns True if ``self`` is a subset of ``other``.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Interval\n",
      " |      >>> Interval(0, 0.5).is_subset(Interval(0, 1))\n",
      " |      True\n",
      " |      >>> Interval(0, 1).is_subset(Interval(0, 1, left_open=True))\n",
      " |      False\n",
      " |  \n",
      " |  is_superset(self, other)\n",
      " |      Returns True if ``self`` is a superset of ``other``.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Interval\n",
      " |      >>> Interval(0, 0.5).is_superset(Interval(0, 1))\n",
      " |      False\n",
      " |      >>> Interval(0, 1).is_superset(Interval(0, 1, left_open=True))\n",
      " |      True\n",
      " |  \n",
      " |  isdisjoint(self, other)\n",
      " |      Alias for :meth:`is_disjoint()`\n",
      " |  \n",
      " |  issubset(self, other)\n",
      " |      Alias for :meth:`is_subset()`\n",
      " |  \n",
      " |  issuperset(self, other)\n",
      " |      Alias for :meth:`is_superset()`\n",
      " |  \n",
      " |  powerset(self)\n",
      " |      Find the Power set of ``self``.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import EmptySet, FiniteSet, Interval\n",
      " |      \n",
      " |      A power set of an empty set:\n",
      " |      \n",
      " |      >>> A = EmptySet\n",
      " |      >>> A.powerset()\n",
      " |      {EmptySet}\n",
      " |      \n",
      " |      A power set of a finite set:\n",
      " |      \n",
      " |      >>> A = FiniteSet(1, 2)\n",
      " |      >>> a, b, c = FiniteSet(1), FiniteSet(2), FiniteSet(1, 2)\n",
      " |      >>> A.powerset() == FiniteSet(a, b, c, EmptySet)\n",
      " |      True\n",
      " |      \n",
      " |      A power set of an interval:\n",
      " |      \n",
      " |      >>> Interval(1, 2).powerset()\n",
      " |      PowerSet(Interval(1, 2))\n",
      " |      \n",
      " |      References\n",
      " |      ==========\n",
      " |      \n",
      " |      .. [1] https://en.wikipedia.org/wiki/Power_set\n",
      " |  \n",
      " |  symmetric_difference(self, other)\n",
      " |      Returns symmetric difference of ``self`` and ``other``.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Interval, S\n",
      " |      >>> Interval(1, 3).symmetric_difference(S.Reals)\n",
      " |      Union(Interval.open(-oo, 1), Interval.open(3, oo))\n",
      " |      >>> Interval(1, 10).symmetric_difference(S.Reals)\n",
      " |      Union(Interval.open(-oo, 1), Interval.open(10, oo))\n",
      " |      \n",
      " |      >>> from sympy import S, EmptySet\n",
      " |      >>> S.Reals.symmetric_difference(EmptySet)\n",
      " |      Reals\n",
      " |      \n",
      " |      References\n",
      " |      ==========\n",
      " |      .. [1] https://en.wikipedia.org/wiki/Symmetric_difference\n",
      " |  \n",
      " |  union(self, other)\n",
      " |      Returns the union of ``self`` and ``other``.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      As a shortcut it is possible to use the ``+`` operator:\n",
      " |      \n",
      " |      >>> from sympy import Interval, FiniteSet\n",
      " |      >>> Interval(0, 1).union(Interval(2, 3))\n",
      " |      Union(Interval(0, 1), Interval(2, 3))\n",
      " |      >>> Interval(0, 1) + Interval(2, 3)\n",
      " |      Union(Interval(0, 1), Interval(2, 3))\n",
      " |      >>> Interval(1, 2, True, True) + FiniteSet(2, 3)\n",
      " |      Union({3}, Interval.Lopen(1, 2))\n",
      " |      \n",
      " |      Similarly it is possible to use the ``-`` operator for set differences:\n",
      " |      \n",
      " |      >>> Interval(0, 2) - Interval(0, 1)\n",
      " |      Interval.Lopen(1, 2)\n",
      " |      >>> Interval(1, 3) - FiniteSet(2)\n",
      " |      Union(Interval.Ropen(1, 2), Interval.Lopen(2, 3))\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Readonly properties inherited from sympy.sets.sets.Set:\n",
      " |  \n",
      " |  boundary\n",
      " |      The boundary or frontier of a set.\n",
      " |      \n",
      " |      Explanation\n",
      " |      ===========\n",
      " |      \n",
      " |      A point x is on the boundary of a set S if\n",
      " |      \n",
      " |      1.  x is in the closure of S.\n",
      " |          I.e. Every neighborhood of x contains a point in S.\n",
      " |      2.  x is not in the interior of S.\n",
      " |          I.e. There does not exist an open set centered on x contained\n",
      " |          entirely within S.\n",
      " |      \n",
      " |      There are the points on the outer rim of S.  If S is open then these\n",
      " |      points need not actually be contained within S.\n",
      " |      \n",
      " |      For example, the boundary of an interval is its start and end points.\n",
      " |      This is true regardless of whether or not the interval is open.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Interval\n",
      " |      >>> Interval(0, 1).boundary\n",
      " |      {0, 1}\n",
      " |      >>> Interval(0, 1, True, False).boundary\n",
      " |      {0, 1}\n",
      " |  \n",
      " |  closure\n",
      " |      Property method which returns the closure of a set.\n",
      " |      The closure is defined as the union of the set itself and its\n",
      " |      boundary.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      >>> from sympy import S, Interval\n",
      " |      >>> S.Reals.closure\n",
      " |      Reals\n",
      " |      >>> Interval(0, 1).closure\n",
      " |      Interval(0, 1)\n",
      " |  \n",
      " |  inf\n",
      " |      The infimum of ``self``.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Interval, Union\n",
      " |      >>> Interval(0, 1).inf\n",
      " |      0\n",
      " |      >>> Union(Interval(0, 1), Interval(2, 3)).inf\n",
      " |      0\n",
      " |  \n",
      " |  interior\n",
      " |      Property method which returns the interior of a set.\n",
      " |      The interior of a set S consists all points of S that do not\n",
      " |      belong to the boundary of S.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      >>> from sympy import Interval\n",
      " |      >>> Interval(0, 1).interior\n",
      " |      Interval.open(0, 1)\n",
      " |      >>> Interval(0, 1).boundary.interior\n",
      " |      EmptySet\n",
      " |  \n",
      " |  is_EmptySet\n",
      " |  \n",
      " |  is_closed\n",
      " |      A property method to check whether a set is closed.\n",
      " |      \n",
      " |      Explanation\n",
      " |      ===========\n",
      " |      \n",
      " |      A set is closed if its complement is an open set. The closedness of a\n",
      " |      subset of the reals is determined with respect to R and its standard\n",
      " |      topology.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      >>> from sympy import Interval\n",
      " |      >>> Interval(0, 1).is_closed\n",
      " |      True\n",
      " |  \n",
      " |  is_open\n",
      " |      Property method to check whether a set is open.\n",
      " |      \n",
      " |      Explanation\n",
      " |      ===========\n",
      " |      \n",
      " |      A set is open if and only if it has an empty intersection with its\n",
      " |      boundary. In particular, a subset A of the reals is open if and only\n",
      " |      if each one of its points is contained in an open interval that is a\n",
      " |      subset of A.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      >>> from sympy import S\n",
      " |      >>> S.Reals.is_open\n",
      " |      True\n",
      " |      >>> S.Rationals.is_open\n",
      " |      False\n",
      " |  \n",
      " |  kind\n",
      " |      The kind of a Set\n",
      " |      \n",
      " |      Explanation\n",
      " |      ===========\n",
      " |      \n",
      " |      Any :class:`Set` will have kind :class:`SetKind` which is\n",
      " |      parametrised by the kind of the elements of the set. For example\n",
      " |      most sets are sets of numbers and will have kind\n",
      " |      ``SetKind(NumberKind)``. If elements of sets are different in kind than\n",
      " |      their kind will ``SetKind(UndefinedKind)``. See\n",
      " |      :class:`sympy.core.kind.Kind` for an explanation of the kind system.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Interval, Matrix, FiniteSet, EmptySet, ProductSet, PowerSet\n",
      " |      \n",
      " |      >>> FiniteSet(Matrix([1, 2])).kind\n",
      " |      SetKind(MatrixKind(NumberKind))\n",
      " |      \n",
      " |      >>> Interval(1, 2).kind\n",
      " |      SetKind(NumberKind)\n",
      " |      \n",
      " |      >>> EmptySet.kind\n",
      " |      SetKind()\n",
      " |      \n",
      " |      A :class:`sympy.sets.powerset.PowerSet` is a set of sets:\n",
      " |      \n",
      " |      >>> PowerSet({1, 2, 3}).kind\n",
      " |      SetKind(SetKind(NumberKind))\n",
      " |      \n",
      " |      A :class:`ProductSet` represents the set of tuples of elements of\n",
      " |      other sets. Its kind is :class:`sympy.core.containers.TupleKind`\n",
      " |      parametrised by the kinds of the elements of those sets:\n",
      " |      \n",
      " |      >>> p = ProductSet(FiniteSet(1, 2), FiniteSet(3, 4))\n",
      " |      >>> list(p)\n",
      " |      [(1, 3), (2, 3), (1, 4), (2, 4)]\n",
      " |      >>> p.kind\n",
      " |      SetKind(TupleKind(NumberKind, NumberKind))\n",
      " |      \n",
      " |      When all elements of the set do not have same kind, the kind\n",
      " |      will be returned as ``SetKind(UndefinedKind)``:\n",
      " |      \n",
      " |      >>> FiniteSet(0, Matrix([1, 2])).kind\n",
      " |      SetKind(UndefinedKind)\n",
      " |      \n",
      " |      The kind of the elements of a set are given by the ``element_kind``\n",
      " |      attribute of ``SetKind``:\n",
      " |      \n",
      " |      >>> Interval(1, 2).kind.element_kind\n",
      " |      NumberKind\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      NumberKind\n",
      " |      sympy.core.kind.UndefinedKind\n",
      " |      sympy.core.containers.TupleKind\n",
      " |      MatrixKind\n",
      " |      sympy.matrices.expressions.sets.MatrixSet\n",
      " |      sympy.sets.conditionset.ConditionSet\n",
      " |      Rationals\n",
      " |      Naturals\n",
      " |      Integers\n",
      " |      sympy.sets.fancysets.ImageSet\n",
      " |      sympy.sets.fancysets.Range\n",
      " |      sympy.sets.fancysets.ComplexRegion\n",
      " |      sympy.sets.powerset.PowerSet\n",
      " |      sympy.sets.sets.ProductSet\n",
      " |      sympy.sets.sets.Interval\n",
      " |      sympy.sets.sets.Union\n",
      " |      sympy.sets.sets.Intersection\n",
      " |      sympy.sets.sets.Complement\n",
      " |      sympy.sets.sets.EmptySet\n",
      " |      sympy.sets.sets.UniversalSet\n",
      " |      sympy.sets.sets.FiniteSet\n",
      " |      sympy.sets.sets.SymmetricDifference\n",
      " |      sympy.sets.sets.DisjointUnion\n",
      " |  \n",
      " |  measure\n",
      " |      The (Lebesgue) measure of ``self``.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Interval, Union\n",
      " |      >>> Interval(0, 1).measure\n",
      " |      1\n",
      " |      >>> Union(Interval(0, 1), Interval(2, 3)).measure\n",
      " |      2\n",
      " |  \n",
      " |  sup\n",
      " |      The supremum of ``self``.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Interval, Union\n",
      " |      >>> Interval(0, 1).sup\n",
      " |      1\n",
      " |      >>> Union(Interval(0, 1), Interval(2, 3)).sup\n",
      " |      3\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Data and other attributes inherited from sympy.sets.sets.Set:\n",
      " |  \n",
      " |  is_Complement = None\n",
      " |  \n",
      " |  is_ComplexRegion = False\n",
      " |  \n",
      " |  is_FiniteSet = False\n",
      " |  \n",
      " |  is_Intersection = None\n",
      " |  \n",
      " |  is_Interval = False\n",
      " |  \n",
      " |  is_ProductSet = False\n",
      " |  \n",
      " |  is_Union = False\n",
      " |  \n",
      " |  is_UniversalSet = None\n",
      " |  \n",
      " |  is_empty = None\n",
      " |  \n",
      " |  is_finite_set = None\n",
      " |  \n",
      " |  is_interval = False\n",
      " |  \n",
      " |  is_iterable = False\n",
      " |  \n",
      " |  is_number = False\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Methods inherited from sympy.core.basic.Basic:\n",
      " |  \n",
      " |  __getstate__(self)\n",
      " |  \n",
      " |  __reduce_ex__(self, protocol)\n",
      " |      Helper for pickle.\n",
      " |  \n",
      " |  __setstate__(self, state)\n",
      " |  \n",
      " |  as_content_primitive(self, radical=False, clear=True)\n",
      " |      A stub to allow Basic args (like Tuple) to be skipped when computing\n",
      " |      the content and primitive components of an expression.\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      sympy.core.expr.Expr.as_content_primitive\n",
      " |  \n",
      " |  as_dummy(self)\n",
      " |      Return the expression with any objects having structurally\n",
      " |      bound symbols replaced with unique, canonical symbols within\n",
      " |      the object in which they appear and having only the default\n",
      " |      assumption for commutativity being True. When applied to a\n",
      " |      symbol a new symbol having only the same commutativity will be\n",
      " |      returned.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Integral, Symbol\n",
      " |      >>> from sympy.abc import x\n",
      " |      >>> r = Symbol('r', real=True)\n",
      " |      >>> Integral(r, (r, x)).as_dummy()\n",
      " |      Integral(_0, (_0, x))\n",
      " |      >>> _.variables[0].is_real is None\n",
      " |      True\n",
      " |      >>> r.as_dummy()\n",
      " |      _r\n",
      " |      \n",
      " |      Notes\n",
      " |      =====\n",
      " |      \n",
      " |      Any object that has structurally bound variables should have\n",
      " |      a property, `bound_symbols` that returns those symbols\n",
      " |      appearing in the object.\n",
      " |  \n",
      " |  atoms(self, *types)\n",
      " |      Returns the atoms that form the current object.\n",
      " |      \n",
      " |      By default, only objects that are truly atomic and cannot\n",
      " |      be divided into smaller pieces are returned: symbols, numbers,\n",
      " |      and number symbols like I and pi. It is possible to request\n",
      " |      atoms of any type, however, as demonstrated below.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import I, pi, sin\n",
      " |      >>> from sympy.abc import x, y\n",
      " |      >>> (1 + x + 2*sin(y + I*pi)).atoms()\n",
      " |      {1, 2, I, pi, x, y}\n",
      " |      \n",
      " |      If one or more types are given, the results will contain only\n",
      " |      those types of atoms.\n",
      " |      \n",
      " |      >>> from sympy import Number, NumberSymbol, Symbol\n",
      " |      >>> (1 + x + 2*sin(y + I*pi)).atoms(Symbol)\n",
      " |      {x, y}\n",
      " |      \n",
      " |      >>> (1 + x + 2*sin(y + I*pi)).atoms(Number)\n",
      " |      {1, 2}\n",
      " |      \n",
      " |      >>> (1 + x + 2*sin(y + I*pi)).atoms(Number, NumberSymbol)\n",
      " |      {1, 2, pi}\n",
      " |      \n",
      " |      >>> (1 + x + 2*sin(y + I*pi)).atoms(Number, NumberSymbol, I)\n",
      " |      {1, 2, I, pi}\n",
      " |      \n",
      " |      Note that I (imaginary unit) and zoo (complex infinity) are special\n",
      " |      types of number symbols and are not part of the NumberSymbol class.\n",
      " |      \n",
      " |      The type can be given implicitly, too:\n",
      " |      \n",
      " |      >>> (1 + x + 2*sin(y + I*pi)).atoms(x) # x is a Symbol\n",
      " |      {x, y}\n",
      " |      \n",
      " |      Be careful to check your assumptions when using the implicit option\n",
      " |      since ``S(1).is_Integer = True`` but ``type(S(1))`` is ``One``, a special type\n",
      " |      of SymPy atom, while ``type(S(2))`` is type ``Integer`` and will find all\n",
      " |      integers in an expression:\n",
      " |      \n",
      " |      >>> from sympy import S\n",
      " |      >>> (1 + x + 2*sin(y + I*pi)).atoms(S(1))\n",
      " |      {1}\n",
      " |      \n",
      " |      >>> (1 + x + 2*sin(y + I*pi)).atoms(S(2))\n",
      " |      {1, 2}\n",
      " |      \n",
      " |      Finally, arguments to atoms() can select more than atomic atoms: any\n",
      " |      SymPy type (loaded in core/__init__.py) can be listed as an argument\n",
      " |      and those types of \"atoms\" as found in scanning the arguments of the\n",
      " |      expression recursively:\n",
      " |      \n",
      " |      >>> from sympy import Function, Mul\n",
      " |      >>> from sympy.core.function import AppliedUndef\n",
      " |      >>> f = Function('f')\n",
      " |      >>> (1 + f(x) + 2*sin(y + I*pi)).atoms(Function)\n",
      " |      {f(x), sin(y + I*pi)}\n",
      " |      >>> (1 + f(x) + 2*sin(y + I*pi)).atoms(AppliedUndef)\n",
      " |      {f(x)}\n",
      " |      \n",
      " |      >>> (1 + x + 2*sin(y + I*pi)).atoms(Mul)\n",
      " |      {I*pi, 2*sin(y + I*pi)}\n",
      " |  \n",
      " |  compare(self, other)\n",
      " |      Return -1, 0, 1 if the object is smaller, equal, or greater than other.\n",
      " |      \n",
      " |      Not in the mathematical sense. If the object is of a different type\n",
      " |      from the \"other\" then their classes are ordered according to\n",
      " |      the sorted_classes list.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy.abc import x, y\n",
      " |      >>> x.compare(y)\n",
      " |      -1\n",
      " |      >>> x.compare(x)\n",
      " |      0\n",
      " |      >>> y.compare(x)\n",
      " |      1\n",
      " |  \n",
      " |  copy(self)\n",
      " |  \n",
      " |  could_extract_minus_sign(self)\n",
      " |  \n",
      " |  count(self, query)\n",
      " |      Count the number of matching subexpressions.\n",
      " |  \n",
      " |  count_ops(self, visual=None)\n",
      " |      Wrapper for count_ops that returns the operation count.\n",
      " |  \n",
      " |  doit(self, **hints)\n",
      " |      Evaluate objects that are not evaluated by default like limits,\n",
      " |      integrals, sums and products. All objects of this kind will be\n",
      " |      evaluated recursively, unless some species were excluded via 'hints'\n",
      " |      or unless the 'deep' hint was set to 'False'.\n",
      " |      \n",
      " |      >>> from sympy import Integral\n",
      " |      >>> from sympy.abc import x\n",
      " |      \n",
      " |      >>> 2*Integral(x, x)\n",
      " |      2*Integral(x, x)\n",
      " |      \n",
      " |      >>> (2*Integral(x, x)).doit()\n",
      " |      x**2\n",
      " |      \n",
      " |      >>> (2*Integral(x, x)).doit(deep=False)\n",
      " |      2*Integral(x, x)\n",
      " |  \n",
      " |  dummy_eq(self, other, symbol=None)\n",
      " |      Compare two expressions and handle dummy symbols.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Dummy\n",
      " |      >>> from sympy.abc import x, y\n",
      " |      \n",
      " |      >>> u = Dummy('u')\n",
      " |      \n",
      " |      >>> (u**2 + 1).dummy_eq(x**2 + 1)\n",
      " |      True\n",
      " |      >>> (u**2 + 1) == (x**2 + 1)\n",
      " |      False\n",
      " |      \n",
      " |      >>> (u**2 + y).dummy_eq(x**2 + y, x)\n",
      " |      True\n",
      " |      >>> (u**2 + y).dummy_eq(x**2 + y, y)\n",
      " |      False\n",
      " |  \n",
      " |  find(self, query, group=False)\n",
      " |      Find all subexpressions matching a query.\n",
      " |  \n",
      " |  has(self, *patterns)\n",
      " |      Test whether any subexpression matches any of the patterns.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import sin\n",
      " |      >>> from sympy.abc import x, y, z\n",
      " |      >>> (x**2 + sin(x*y)).has(z)\n",
      " |      False\n",
      " |      >>> (x**2 + sin(x*y)).has(x, y, z)\n",
      " |      True\n",
      " |      >>> x.has(x)\n",
      " |      True\n",
      " |      \n",
      " |      Note ``has`` is a structural algorithm with no knowledge of\n",
      " |      mathematics. Consider the following half-open interval:\n",
      " |      \n",
      " |      >>> from sympy import Interval\n",
      " |      >>> i = Interval.Lopen(0, 5); i\n",
      " |      Interval.Lopen(0, 5)\n",
      " |      >>> i.args\n",
      " |      (0, 5, True, False)\n",
      " |      >>> i.has(4)  # there is no \"4\" in the arguments\n",
      " |      False\n",
      " |      >>> i.has(0)  # there *is* a \"0\" in the arguments\n",
      " |      True\n",
      " |      \n",
      " |      Instead, use ``contains`` to determine whether a number is in the\n",
      " |      interval or not:\n",
      " |      \n",
      " |      >>> i.contains(4)\n",
      " |      True\n",
      " |      >>> i.contains(0)\n",
      " |      False\n",
      " |      \n",
      " |      \n",
      " |      Note that ``expr.has(*patterns)`` is exactly equivalent to\n",
      " |      ``any(expr.has(p) for p in patterns)``. In particular, ``False`` is\n",
      " |      returned when the list of patterns is empty.\n",
      " |      \n",
      " |      >>> x.has()\n",
      " |      False\n",
      " |  \n",
      " |  has_free(self, *patterns)\n",
      " |      Return True if self has object(s) ``x`` as a free expression\n",
      " |      else False.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Integral, Function\n",
      " |      >>> from sympy.abc import x, y\n",
      " |      >>> f = Function('f')\n",
      " |      >>> g = Function('g')\n",
      " |      >>> expr = Integral(f(x), (f(x), 1, g(y)))\n",
      " |      >>> expr.free_symbols\n",
      " |      {y}\n",
      " |      >>> expr.has_free(g(y))\n",
      " |      True\n",
      " |      >>> expr.has_free(*(x, f(x)))\n",
      " |      False\n",
      " |      \n",
      " |      This works for subexpressions and types, too:\n",
      " |      \n",
      " |      >>> expr.has_free(g)\n",
      " |      True\n",
      " |      >>> (x + y + 1).has_free(y + 1)\n",
      " |      True\n",
      " |  \n",
      " |  has_xfree(self, s: 'set[Basic]')\n",
      " |      Return True if self has any of the patterns in s as a\n",
      " |      free argument, else False. This is like `Basic.has_free`\n",
      " |      but this will only report exact argument matches.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Function\n",
      " |      >>> from sympy.abc import x, y\n",
      " |      >>> f = Function('f')\n",
      " |      >>> f(x).has_xfree({f})\n",
      " |      False\n",
      " |      >>> f(x).has_xfree({f(x)})\n",
      " |      True\n",
      " |      >>> f(x + 1).has_xfree({x})\n",
      " |      True\n",
      " |      >>> f(x + 1).has_xfree({x + 1})\n",
      " |      True\n",
      " |      >>> f(x + y + 1).has_xfree({x + 1})\n",
      " |      False\n",
      " |  \n",
      " |  is_hypergeometric(self, k)\n",
      " |  \n",
      " |  match(self, pattern, old=False)\n",
      " |      Pattern matching.\n",
      " |      \n",
      " |      Wild symbols match all.\n",
      " |      \n",
      " |      Return ``None`` when expression (self) does not match\n",
      " |      with pattern. Otherwise return a dictionary such that::\n",
      " |      \n",
      " |        pattern.xreplace(self.match(pattern)) == self\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Wild, Sum\n",
      " |      >>> from sympy.abc import x, y\n",
      " |      >>> p = Wild(\"p\")\n",
      " |      >>> q = Wild(\"q\")\n",
      " |      >>> r = Wild(\"r\")\n",
      " |      >>> e = (x+y)**(x+y)\n",
      " |      >>> e.match(p**p)\n",
      " |      {p_: x + y}\n",
      " |      >>> e.match(p**q)\n",
      " |      {p_: x + y, q_: x + y}\n",
      " |      >>> e = (2*x)**2\n",
      " |      >>> e.match(p*q**r)\n",
      " |      {p_: 4, q_: x, r_: 2}\n",
      " |      >>> (p*q**r).xreplace(e.match(p*q**r))\n",
      " |      4*x**2\n",
      " |      \n",
      " |      Structurally bound symbols are ignored during matching:\n",
      " |      \n",
      " |      >>> Sum(x, (x, 1, 2)).match(Sum(y, (y, 1, p)))\n",
      " |      {p_: 2}\n",
      " |      \n",
      " |      But they can be identified if desired:\n",
      " |      \n",
      " |      >>> Sum(x, (x, 1, 2)).match(Sum(q, (q, 1, p)))\n",
      " |      {p_: 2, q_: x}\n",
      " |      \n",
      " |      The ``old`` flag will give the old-style pattern matching where\n",
      " |      expressions and patterns are essentially solved to give the\n",
      " |      match. Both of the following give None unless ``old=True``:\n",
      " |      \n",
      " |      >>> (x - 2).match(p - x, old=True)\n",
      " |      {p_: 2*x - 2}\n",
      " |      >>> (2/x).match(p*x, old=True)\n",
      " |      {p_: 2/x**2}\n",
      " |  \n",
      " |  matches(self, expr, repl_dict=None, old=False)\n",
      " |      Helper method for match() that looks for a match between Wild symbols\n",
      " |      in self and expressions in expr.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import symbols, Wild, Basic\n",
      " |      >>> a, b, c = symbols('a b c')\n",
      " |      >>> x = Wild('x')\n",
      " |      >>> Basic(a + x, x).matches(Basic(a + b, c)) is None\n",
      " |      True\n",
      " |      >>> Basic(a + x, x).matches(Basic(a + b + c, b + c))\n",
      " |      {x_: b + c}\n",
      " |  \n",
      " |  rcall(self, *args)\n",
      " |      Apply on the argument recursively through the expression tree.\n",
      " |      \n",
      " |      This method is used to simulate a common abuse of notation for\n",
      " |      operators. For instance, in SymPy the following will not work:\n",
      " |      \n",
      " |      ``(x+Lambda(y, 2*y))(z) == x+2*z``,\n",
      " |      \n",
      " |      however, you can use:\n",
      " |      \n",
      " |      >>> from sympy import Lambda\n",
      " |      >>> from sympy.abc import x, y, z\n",
      " |      >>> (x + Lambda(y, 2*y)).rcall(z)\n",
      " |      x + 2*z\n",
      " |  \n",
      " |  refine(self, assumption=True)\n",
      " |      See the refine function in sympy.assumptions\n",
      " |  \n",
      " |  replace(self, query, value, map=False, simultaneous=True, exact=None)\n",
      " |      Replace matching subexpressions of ``self`` with ``value``.\n",
      " |      \n",
      " |      If ``map = True`` then also return the mapping {old: new} where ``old``\n",
      " |      was a sub-expression found with query and ``new`` is the replacement\n",
      " |      value for it. If the expression itself does not match the query, then\n",
      " |      the returned value will be ``self.xreplace(map)`` otherwise it should\n",
      " |      be ``self.subs(ordered(map.items()))``.\n",
      " |      \n",
      " |      Traverses an expression tree and performs replacement of matching\n",
      " |      subexpressions from the bottom to the top of the tree. The default\n",
      " |      approach is to do the replacement in a simultaneous fashion so\n",
      " |      changes made are targeted only once. If this is not desired or causes\n",
      " |      problems, ``simultaneous`` can be set to False.\n",
      " |      \n",
      " |      In addition, if an expression containing more than one Wild symbol\n",
      " |      is being used to match subexpressions and the ``exact`` flag is None\n",
      " |      it will be set to True so the match will only succeed if all non-zero\n",
      " |      values are received for each Wild that appears in the match pattern.\n",
      " |      Setting this to False accepts a match of 0; while setting it True\n",
      " |      accepts all matches that have a 0 in them. See example below for\n",
      " |      cautions.\n",
      " |      \n",
      " |      The list of possible combinations of queries and replacement values\n",
      " |      is listed below:\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      Initial setup\n",
      " |      \n",
      " |      >>> from sympy import log, sin, cos, tan, Wild, Mul, Add\n",
      " |      >>> from sympy.abc import x, y\n",
      " |      >>> f = log(sin(x)) + tan(sin(x**2))\n",
      " |      \n",
      " |      1.1. type -> type\n",
      " |          obj.replace(type, newtype)\n",
      " |      \n",
      " |          When object of type ``type`` is found, replace it with the\n",
      " |          result of passing its argument(s) to ``newtype``.\n",
      " |      \n",
      " |          >>> f.replace(sin, cos)\n",
      " |          log(cos(x)) + tan(cos(x**2))\n",
      " |          >>> sin(x).replace(sin, cos, map=True)\n",
      " |          (cos(x), {sin(x): cos(x)})\n",
      " |          >>> (x*y).replace(Mul, Add)\n",
      " |          x + y\n",
      " |      \n",
      " |      1.2. type -> func\n",
      " |          obj.replace(type, func)\n",
      " |      \n",
      " |          When object of type ``type`` is found, apply ``func`` to its\n",
      " |          argument(s). ``func`` must be written to handle the number\n",
      " |          of arguments of ``type``.\n",
      " |      \n",
      " |          >>> f.replace(sin, lambda arg: sin(2*arg))\n",
      " |          log(sin(2*x)) + tan(sin(2*x**2))\n",
      " |          >>> (x*y).replace(Mul, lambda *args: sin(2*Mul(*args)))\n",
      " |          sin(2*x*y)\n",
      " |      \n",
      " |      2.1. pattern -> expr\n",
      " |          obj.replace(pattern(wild), expr(wild))\n",
      " |      \n",
      " |          Replace subexpressions matching ``pattern`` with the expression\n",
      " |          written in terms of the Wild symbols in ``pattern``.\n",
      " |      \n",
      " |          >>> a, b = map(Wild, 'ab')\n",
      " |          >>> f.replace(sin(a), tan(a))\n",
      " |          log(tan(x)) + tan(tan(x**2))\n",
      " |          >>> f.replace(sin(a), tan(a/2))\n",
      " |          log(tan(x/2)) + tan(tan(x**2/2))\n",
      " |          >>> f.replace(sin(a), a)\n",
      " |          log(x) + tan(x**2)\n",
      " |          >>> (x*y).replace(a*x, a)\n",
      " |          y\n",
      " |      \n",
      " |          Matching is exact by default when more than one Wild symbol\n",
      " |          is used: matching fails unless the match gives non-zero\n",
      " |          values for all Wild symbols:\n",
      " |      \n",
      " |          >>> (2*x + y).replace(a*x + b, b - a)\n",
      " |          y - 2\n",
      " |          >>> (2*x).replace(a*x + b, b - a)\n",
      " |          2*x\n",
      " |      \n",
      " |          When set to False, the results may be non-intuitive:\n",
      " |      \n",
      " |          >>> (2*x).replace(a*x + b, b - a, exact=False)\n",
      " |          2/x\n",
      " |      \n",
      " |      2.2. pattern -> func\n",
      " |          obj.replace(pattern(wild), lambda wild: expr(wild))\n",
      " |      \n",
      " |          All behavior is the same as in 2.1 but now a function in terms of\n",
      " |          pattern variables is used rather than an expression:\n",
      " |      \n",
      " |          >>> f.replace(sin(a), lambda a: sin(2*a))\n",
      " |          log(sin(2*x)) + tan(sin(2*x**2))\n",
      " |      \n",
      " |      3.1. func -> func\n",
      " |          obj.replace(filter, func)\n",
      " |      \n",
      " |          Replace subexpression ``e`` with ``func(e)`` if ``filter(e)``\n",
      " |          is True.\n",
      " |      \n",
      " |          >>> g = 2*sin(x**3)\n",
      " |          >>> g.replace(lambda expr: expr.is_Number, lambda expr: expr**2)\n",
      " |          4*sin(x**9)\n",
      " |      \n",
      " |      The expression itself is also targeted by the query but is done in\n",
      " |      such a fashion that changes are not made twice.\n",
      " |      \n",
      " |          >>> e = x*(x*y + 1)\n",
      " |          >>> e.replace(lambda x: x.is_Mul, lambda x: 2*x)\n",
      " |          2*x*(2*x*y + 1)\n",
      " |      \n",
      " |      When matching a single symbol, `exact` will default to True, but\n",
      " |      this may or may not be the behavior that is desired:\n",
      " |      \n",
      " |      Here, we want `exact=False`:\n",
      " |      \n",
      " |      >>> from sympy import Function\n",
      " |      >>> f = Function('f')\n",
      " |      >>> e = f(1) + f(0)\n",
      " |      >>> q = f(a), lambda a: f(a + 1)\n",
      " |      >>> e.replace(*q, exact=False)\n",
      " |      f(1) + f(2)\n",
      " |      >>> e.replace(*q, exact=True)\n",
      " |      f(0) + f(2)\n",
      " |      \n",
      " |      But here, the nature of matching makes selecting\n",
      " |      the right setting tricky:\n",
      " |      \n",
      " |      >>> e = x**(1 + y)\n",
      " |      >>> (x**(1 + y)).replace(x**(1 + a), lambda a: x**-a, exact=False)\n",
      " |      x\n",
      " |      >>> (x**(1 + y)).replace(x**(1 + a), lambda a: x**-a, exact=True)\n",
      " |      x**(-x - y + 1)\n",
      " |      >>> (x**y).replace(x**(1 + a), lambda a: x**-a, exact=False)\n",
      " |      x\n",
      " |      >>> (x**y).replace(x**(1 + a), lambda a: x**-a, exact=True)\n",
      " |      x**(1 - y)\n",
      " |      \n",
      " |      It is probably better to use a different form of the query\n",
      " |      that describes the target expression more precisely:\n",
      " |      \n",
      " |      >>> (1 + x**(1 + y)).replace(\n",
      " |      ... lambda x: x.is_Pow and x.exp.is_Add and x.exp.args[0] == 1,\n",
      " |      ... lambda x: x.base**(1 - (x.exp - 1)))\n",
      " |      ...\n",
      " |      x**(1 - y) + 1\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      subs: substitution of subexpressions as defined by the objects\n",
      " |            themselves.\n",
      " |      xreplace: exact node replacement in expr tree; also capable of\n",
      " |                using matching rules\n",
      " |  \n",
      " |  rewrite(self, *args, deep=True, **hints)\n",
      " |      Rewrite *self* using a defined rule.\n",
      " |      \n",
      " |      Rewriting transforms an expression to another, which is mathematically\n",
      " |      equivalent but structurally different. For example you can rewrite\n",
      " |      trigonometric functions as complex exponentials or combinatorial\n",
      " |      functions as gamma function.\n",
      " |      \n",
      " |      This method takes a *pattern* and a *rule* as positional arguments.\n",
      " |      *pattern* is optional parameter which defines the types of expressions\n",
      " |      that will be transformed. If it is not passed, all possible expressions\n",
      " |      will be rewritten. *rule* defines how the expression will be rewritten.\n",
      " |      \n",
      " |      Parameters\n",
      " |      ==========\n",
      " |      \n",
      " |      args : Expr\n",
      " |          A *rule*, or *pattern* and *rule*.\n",
      " |          - *pattern* is a type or an iterable of types.\n",
      " |          - *rule* can be any object.\n",
      " |      \n",
      " |      deep : bool, optional\n",
      " |          If ``True``, subexpressions are recursively transformed. Default is\n",
      " |          ``True``.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      If *pattern* is unspecified, all possible expressions are transformed.\n",
      " |      \n",
      " |      >>> from sympy import cos, sin, exp, I\n",
      " |      >>> from sympy.abc import x\n",
      " |      >>> expr = cos(x) + I*sin(x)\n",
      " |      >>> expr.rewrite(exp)\n",
      " |      exp(I*x)\n",
      " |      \n",
      " |      Pattern can be a type or an iterable of types.\n",
      " |      \n",
      " |      >>> expr.rewrite(sin, exp)\n",
      " |      exp(I*x)/2 + cos(x) - exp(-I*x)/2\n",
      " |      >>> expr.rewrite([cos,], exp)\n",
      " |      exp(I*x)/2 + I*sin(x) + exp(-I*x)/2\n",
      " |      >>> expr.rewrite([cos, sin], exp)\n",
      " |      exp(I*x)\n",
      " |      \n",
      " |      Rewriting behavior can be implemented by defining ``_eval_rewrite()``\n",
      " |      method.\n",
      " |      \n",
      " |      >>> from sympy import Expr, sqrt, pi\n",
      " |      >>> class MySin(Expr):\n",
      " |      ...     def _eval_rewrite(self, rule, args, **hints):\n",
      " |      ...         x, = args\n",
      " |      ...         if rule == cos:\n",
      " |      ...             return cos(pi/2 - x, evaluate=False)\n",
      " |      ...         if rule == sqrt:\n",
      " |      ...             return sqrt(1 - cos(x)**2)\n",
      " |      >>> MySin(MySin(x)).rewrite(cos)\n",
      " |      cos(-cos(-x + pi/2) + pi/2)\n",
      " |      >>> MySin(x).rewrite(sqrt)\n",
      " |      sqrt(1 - cos(x)**2)\n",
      " |      \n",
      " |      Defining ``_eval_rewrite_as_[...]()`` method is supported for backwards\n",
      " |      compatibility reason. This may be removed in the future and using it is\n",
      " |      discouraged.\n",
      " |      \n",
      " |      >>> class MySin(Expr):\n",
      " |      ...     def _eval_rewrite_as_cos(self, *args, **hints):\n",
      " |      ...         x, = args\n",
      " |      ...         return cos(pi/2 - x, evaluate=False)\n",
      " |      >>> MySin(x).rewrite(cos)\n",
      " |      cos(-x + pi/2)\n",
      " |  \n",
      " |  simplify(self, **kwargs)\n",
      " |      See the simplify function in sympy.simplify\n",
      " |  \n",
      " |  sort_key(self, order=None)\n",
      " |      Return a sort key.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import S, I\n",
      " |      \n",
      " |      >>> sorted([S(1)/2, I, -I], key=lambda x: x.sort_key())\n",
      " |      [1/2, -I, I]\n",
      " |      \n",
      " |      >>> S(\"[x, 1/x, 1/x**2, x**2, x**(1/2), x**(1/4), x**(3/2)]\")\n",
      " |      [x, 1/x, x**(-2), x**2, sqrt(x), x**(1/4), x**(3/2)]\n",
      " |      >>> sorted(_, key=lambda x: x.sort_key())\n",
      " |      [x**(-2), 1/x, x**(1/4), sqrt(x), x, x**(3/2), x**2]\n",
      " |  \n",
      " |  subs(self, *args, **kwargs)\n",
      " |      Substitutes old for new in an expression after sympifying args.\n",
      " |      \n",
      " |      `args` is either:\n",
      " |        - two arguments, e.g. foo.subs(old, new)\n",
      " |        - one iterable argument, e.g. foo.subs(iterable). The iterable may be\n",
      " |           o an iterable container with (old, new) pairs. In this case the\n",
      " |             replacements are processed in the order given with successive\n",
      " |             patterns possibly affecting replacements already made.\n",
      " |           o a dict or set whose key/value items correspond to old/new pairs.\n",
      " |             In this case the old/new pairs will be sorted by op count and in\n",
      " |             case of a tie, by number of args and the default_sort_key. The\n",
      " |             resulting sorted list is then processed as an iterable container\n",
      " |             (see previous).\n",
      " |      \n",
      " |      If the keyword ``simultaneous`` is True, the subexpressions will not be\n",
      " |      evaluated until all the substitutions have been made.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import pi, exp, limit, oo\n",
      " |      >>> from sympy.abc import x, y\n",
      " |      >>> (1 + x*y).subs(x, pi)\n",
      " |      pi*y + 1\n",
      " |      >>> (1 + x*y).subs({x:pi, y:2})\n",
      " |      1 + 2*pi\n",
      " |      >>> (1 + x*y).subs([(x, pi), (y, 2)])\n",
      " |      1 + 2*pi\n",
      " |      >>> reps = [(y, x**2), (x, 2)]\n",
      " |      >>> (x + y).subs(reps)\n",
      " |      6\n",
      " |      >>> (x + y).subs(reversed(reps))\n",
      " |      x**2 + 2\n",
      " |      \n",
      " |      >>> (x**2 + x**4).subs(x**2, y)\n",
      " |      y**2 + y\n",
      " |      \n",
      " |      To replace only the x**2 but not the x**4, use xreplace:\n",
      " |      \n",
      " |      >>> (x**2 + x**4).xreplace({x**2: y})\n",
      " |      x**4 + y\n",
      " |      \n",
      " |      To delay evaluation until all substitutions have been made,\n",
      " |      set the keyword ``simultaneous`` to True:\n",
      " |      \n",
      " |      >>> (x/y).subs([(x, 0), (y, 0)])\n",
      " |      0\n",
      " |      >>> (x/y).subs([(x, 0), (y, 0)], simultaneous=True)\n",
      " |      nan\n",
      " |      \n",
      " |      This has the added feature of not allowing subsequent substitutions\n",
      " |      to affect those already made:\n",
      " |      \n",
      " |      >>> ((x + y)/y).subs({x + y: y, y: x + y})\n",
      " |      1\n",
      " |      >>> ((x + y)/y).subs({x + y: y, y: x + y}, simultaneous=True)\n",
      " |      y/(x + y)\n",
      " |      \n",
      " |      In order to obtain a canonical result, unordered iterables are\n",
      " |      sorted by count_op length, number of arguments and by the\n",
      " |      default_sort_key to break any ties. All other iterables are left\n",
      " |      unsorted.\n",
      " |      \n",
      " |      >>> from sympy import sqrt, sin, cos\n",
      " |      >>> from sympy.abc import a, b, c, d, e\n",
      " |      \n",
      " |      >>> A = (sqrt(sin(2*x)), a)\n",
      " |      >>> B = (sin(2*x), b)\n",
      " |      >>> C = (cos(2*x), c)\n",
      " |      >>> D = (x, d)\n",
      " |      >>> E = (exp(x), e)\n",
      " |      \n",
      " |      >>> expr = sqrt(sin(2*x))*sin(exp(x)*x)*cos(2*x) + sin(2*x)\n",
      " |      \n",
      " |      >>> expr.subs(dict([A, B, C, D, E]))\n",
      " |      a*c*sin(d*e) + b\n",
      " |      \n",
      " |      The resulting expression represents a literal replacement of the\n",
      " |      old arguments with the new arguments. This may not reflect the\n",
      " |      limiting behavior of the expression:\n",
      " |      \n",
      " |      >>> (x**3 - 3*x).subs({x: oo})\n",
      " |      nan\n",
      " |      \n",
      " |      >>> limit(x**3 - 3*x, x, oo)\n",
      " |      oo\n",
      " |      \n",
      " |      If the substitution will be followed by numerical\n",
      " |      evaluation, it is better to pass the substitution to\n",
      " |      evalf as\n",
      " |      \n",
      " |      >>> (1/x).evalf(subs={x: 3.0}, n=21)\n",
      " |      0.333333333333333333333\n",
      " |      \n",
      " |      rather than\n",
      " |      \n",
      " |      >>> (1/x).subs({x: 3.0}).evalf(21)\n",
      " |      0.333333333333333314830\n",
      " |      \n",
      " |      as the former will ensure that the desired level of precision is\n",
      " |      obtained.\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      replace: replacement capable of doing wildcard-like matching,\n",
      " |               parsing of match, and conditional replacements\n",
      " |      xreplace: exact node replacement in expr tree; also capable of\n",
      " |                using matching rules\n",
      " |      sympy.core.evalf.EvalfMixin.evalf: calculates the given formula to a desired level of precision\n",
      " |  \n",
      " |  xreplace(self, rule)\n",
      " |      Replace occurrences of objects within the expression.\n",
      " |      \n",
      " |      Parameters\n",
      " |      ==========\n",
      " |      \n",
      " |      rule : dict-like\n",
      " |          Expresses a replacement rule\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      xreplace : the result of the replacement\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import symbols, pi, exp\n",
      " |      >>> x, y, z = symbols('x y z')\n",
      " |      >>> (1 + x*y).xreplace({x: pi})\n",
      " |      pi*y + 1\n",
      " |      >>> (1 + x*y).xreplace({x: pi, y: 2})\n",
      " |      1 + 2*pi\n",
      " |      \n",
      " |      Replacements occur only if an entire node in the expression tree is\n",
      " |      matched:\n",
      " |      \n",
      " |      >>> (x*y + z).xreplace({x*y: pi})\n",
      " |      z + pi\n",
      " |      >>> (x*y*z).xreplace({x*y: pi})\n",
      " |      x*y*z\n",
      " |      >>> (2*x).xreplace({2*x: y, x: z})\n",
      " |      y\n",
      " |      >>> (2*2*x).xreplace({2*x: y, x: z})\n",
      " |      4*z\n",
      " |      >>> (x + y + 2).xreplace({x + y: 2})\n",
      " |      x + y + 2\n",
      " |      >>> (x + 2 + exp(x + 2)).xreplace({x + 2: y})\n",
      " |      x + exp(y) + 2\n",
      " |      \n",
      " |      xreplace does not differentiate between free and bound symbols. In the\n",
      " |      following, subs(x, y) would not change x since it is a bound symbol,\n",
      " |      but xreplace does:\n",
      " |      \n",
      " |      >>> from sympy import Integral\n",
      " |      >>> Integral(x, (x, 1, 2*x)).xreplace({x: y})\n",
      " |      Integral(y, (y, 1, 2*y))\n",
      " |      \n",
      " |      Trying to replace x with an expression raises an error:\n",
      " |      \n",
      " |      >>> Integral(x, (x, 1, 2*x)).xreplace({x: 2*y}) # doctest: +SKIP\n",
      " |      ValueError: Invalid limits given: ((2*y, 1, 4*y),)\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      replace: replacement capable of doing wildcard-like matching,\n",
      " |               parsing of match, and conditional replacements\n",
      " |      subs: substitution of subexpressions as defined by the objects\n",
      " |            themselves.\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Class methods inherited from sympy.core.basic.Basic:\n",
      " |  \n",
      " |  __init_subclass__() from builtins.type\n",
      " |      This method is called when a class is subclassed.\n",
      " |      \n",
      " |      The default implementation does nothing. It may be\n",
      " |      overridden to extend subclasses.\n",
      " |  \n",
      " |  class_key() from builtins.type\n",
      " |      Nice order of classes.\n",
      " |  \n",
      " |  fromiter(args, **assumptions) from builtins.type\n",
      " |      Create a new object from an iterable.\n",
      " |      \n",
      " |      This is a convenience function that allows one to create objects from\n",
      " |      any iterable, without having to convert to a list or tuple first.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Tuple\n",
      " |      >>> Tuple.fromiter(i for i in range(5))\n",
      " |      (0, 1, 2, 3, 4)\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Readonly properties inherited from sympy.core.basic.Basic:\n",
      " |  \n",
      " |  __sympy__\n",
      " |  \n",
      " |  args\n",
      " |      Returns a tuple of arguments of 'self'.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import cot\n",
      " |      >>> from sympy.abc import x, y\n",
      " |      \n",
      " |      >>> cot(x).args\n",
      " |      (x,)\n",
      " |      \n",
      " |      >>> cot(x).args[0]\n",
      " |      x\n",
      " |      \n",
      " |      >>> (x*y).args\n",
      " |      (x, y)\n",
      " |      \n",
      " |      >>> (x*y).args[1]\n",
      " |      y\n",
      " |      \n",
      " |      Notes\n",
      " |      =====\n",
      " |      \n",
      " |      Never use self._args, always use self.args.\n",
      " |      Only use _args in __new__ when creating a new function.\n",
      " |      Do not override .args() from Basic (so that it is easy to\n",
      " |      change the interface in the future if needed).\n",
      " |  \n",
      " |  assumptions0\n",
      " |      Return object `type` assumptions.\n",
      " |      \n",
      " |      For example:\n",
      " |      \n",
      " |        Symbol('x', real=True)\n",
      " |        Symbol('x', integer=True)\n",
      " |      \n",
      " |      are different objects. In other words, besides Python type (Symbol in\n",
      " |      this case), the initial assumptions are also forming their typeinfo.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Symbol\n",
      " |      >>> from sympy.abc import x\n",
      " |      >>> x.assumptions0\n",
      " |      {'commutative': True}\n",
      " |      >>> x = Symbol(\"x\", positive=True)\n",
      " |      >>> x.assumptions0\n",
      " |      {'commutative': True, 'complex': True, 'extended_negative': False,\n",
      " |       'extended_nonnegative': True, 'extended_nonpositive': False,\n",
      " |       'extended_nonzero': True, 'extended_positive': True, 'extended_real':\n",
      " |       True, 'finite': True, 'hermitian': True, 'imaginary': False,\n",
      " |       'infinite': False, 'negative': False, 'nonnegative': True,\n",
      " |       'nonpositive': False, 'nonzero': True, 'positive': True, 'real':\n",
      " |       True, 'zero': False}\n",
      " |  \n",
      " |  canonical_variables\n",
      " |      Return a dictionary mapping any variable defined in\n",
      " |      ``self.bound_symbols`` to Symbols that do not clash\n",
      " |      with any free symbols in the expression.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Lambda\n",
      " |      >>> from sympy.abc import x\n",
      " |      >>> Lambda(x, 2*x).canonical_variables\n",
      " |      {x: _0}\n",
      " |  \n",
      " |  expr_free_symbols\n",
      " |  \n",
      " |  free_symbols\n",
      " |      Return from the atoms of self those which are free symbols.\n",
      " |      \n",
      " |      Not all free symbols are ``Symbol``. Eg: IndexedBase('I')[0].free_symbols\n",
      " |      \n",
      " |      For most expressions, all symbols are free symbols. For some classes\n",
      " |      this is not true. e.g. Integrals use Symbols for the dummy variables\n",
      " |      which are bound variables, so Integral has a method to return all\n",
      " |      symbols except those. Derivative keeps track of symbols with respect\n",
      " |      to which it will perform a derivative; those are\n",
      " |      bound variables, too, so it has its own free_symbols method.\n",
      " |      \n",
      " |      Any other method that uses bound variables should implement a\n",
      " |      free_symbols method.\n",
      " |  \n",
      " |  func\n",
      " |      The top-level function in an expression.\n",
      " |      \n",
      " |      The following should hold for all objects::\n",
      " |      \n",
      " |          >> x == x.func(*x.args)\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy.abc import x\n",
      " |      >>> a = 2*x\n",
      " |      >>> a.func\n",
      " |      <class 'sympy.core.mul.Mul'>\n",
      " |      >>> a.args\n",
      " |      (2, x)\n",
      " |      >>> a.func(*a.args)\n",
      " |      2*x\n",
      " |      >>> a == a.func(*a.args)\n",
      " |      True\n",
      " |  \n",
      " |  is_algebraic\n",
      " |  \n",
      " |  is_antihermitian\n",
      " |  \n",
      " |  is_commutative\n",
      " |  \n",
      " |  is_comparable\n",
      " |      Return True if self can be computed to a real number\n",
      " |      (or already is a real number) with precision, else False.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import exp_polar, pi, I\n",
      " |      >>> (I*exp_polar(I*pi/2)).is_comparable\n",
      " |      True\n",
      " |      >>> (I*exp_polar(I*pi*2)).is_comparable\n",
      " |      False\n",
      " |      \n",
      " |      A False result does not mean that `self` cannot be rewritten\n",
      " |      into a form that would be comparable. For example, the\n",
      " |      difference computed below is zero but without simplification\n",
      " |      it does not evaluate to a zero with precision:\n",
      " |      \n",
      " |      >>> e = 2**pi*(1 + 2**pi)\n",
      " |      >>> dif = e - e.expand()\n",
      " |      >>> dif.is_comparable\n",
      " |      False\n",
      " |      >>> dif.n(2)._prec\n",
      " |      1\n",
      " |  \n",
      " |  is_complex\n",
      " |  \n",
      " |  is_composite\n",
      " |  \n",
      " |  is_even\n",
      " |  \n",
      " |  is_extended_negative\n",
      " |  \n",
      " |  is_extended_nonnegative\n",
      " |  \n",
      " |  is_extended_nonpositive\n",
      " |  \n",
      " |  is_extended_nonzero\n",
      " |  \n",
      " |  is_extended_positive\n",
      " |  \n",
      " |  is_extended_real\n",
      " |  \n",
      " |  is_finite\n",
      " |  \n",
      " |  is_hermitian\n",
      " |  \n",
      " |  is_imaginary\n",
      " |  \n",
      " |  is_infinite\n",
      " |  \n",
      " |  is_integer\n",
      " |  \n",
      " |  is_irrational\n",
      " |  \n",
      " |  is_negative\n",
      " |  \n",
      " |  is_noninteger\n",
      " |  \n",
      " |  is_nonnegative\n",
      " |  \n",
      " |  is_nonpositive\n",
      " |  \n",
      " |  is_nonzero\n",
      " |  \n",
      " |  is_odd\n",
      " |  \n",
      " |  is_polar\n",
      " |  \n",
      " |  is_positive\n",
      " |  \n",
      " |  is_prime\n",
      " |  \n",
      " |  is_rational\n",
      " |  \n",
      " |  is_real\n",
      " |  \n",
      " |  is_transcendental\n",
      " |  \n",
      " |  is_zero\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Data and other attributes inherited from sympy.core.basic.Basic:\n",
      " |  \n",
      " |  is_Add = False\n",
      " |  \n",
      " |  is_AlgebraicNumber = False\n",
      " |  \n",
      " |  is_Atom = False\n",
      " |  \n",
      " |  is_Boolean = False\n",
      " |  \n",
      " |  is_Derivative = False\n",
      " |  \n",
      " |  is_Dummy = False\n",
      " |  \n",
      " |  is_Equality = False\n",
      " |  \n",
      " |  is_Float = False\n",
      " |  \n",
      " |  is_Function = False\n",
      " |  \n",
      " |  is_Indexed = False\n",
      " |  \n",
      " |  is_Integer = False\n",
      " |  \n",
      " |  is_MatAdd = False\n",
      " |  \n",
      " |  is_MatMul = False\n",
      " |  \n",
      " |  is_Matrix = False\n",
      " |  \n",
      " |  is_Mul = False\n",
      " |  \n",
      " |  is_Not = False\n",
      " |  \n",
      " |  is_Number = False\n",
      " |  \n",
      " |  is_NumberSymbol = False\n",
      " |  \n",
      " |  is_Order = False\n",
      " |  \n",
      " |  is_Piecewise = False\n",
      " |  \n",
      " |  is_Point = False\n",
      " |  \n",
      " |  is_Poly = False\n",
      " |  \n",
      " |  is_Pow = False\n",
      " |  \n",
      " |  is_Rational = False\n",
      " |  \n",
      " |  is_Relational = False\n",
      " |  \n",
      " |  is_Symbol = False\n",
      " |  \n",
      " |  is_Vector = False\n",
      " |  \n",
      " |  is_Wild = False\n",
      " |  \n",
      " |  is_symbol = False\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Methods inherited from sympy.core.evalf.EvalfMixin:\n",
      " |  \n",
      " |  evalf(self, n=15, subs=None, maxn=100, chop=False, strict=False, quad=None, verbose=False)\n",
      " |      Evaluate the given formula to an accuracy of *n* digits.\n",
      " |      \n",
      " |      Parameters\n",
      " |      ==========\n",
      " |      \n",
      " |      subs : dict, optional\n",
      " |          Substitute numerical values for symbols, e.g.\n",
      " |          ``subs={x:3, y:1+pi}``. The substitutions must be given as a\n",
      " |          dictionary.\n",
      " |      \n",
      " |      maxn : int, optional\n",
      " |          Allow a maximum temporary working precision of maxn digits.\n",
      " |      \n",
      " |      chop : bool or number, optional\n",
      " |          Specifies how to replace tiny real or imaginary parts in\n",
      " |          subresults by exact zeros.\n",
      " |      \n",
      " |          When ``True`` the chop value defaults to standard precision.\n",
      " |      \n",
      " |          Otherwise the chop value is used to determine the\n",
      " |          magnitude of \"small\" for purposes of chopping.\n",
      " |      \n",
      " |          >>> from sympy import N\n",
      " |          >>> x = 1e-4\n",
      " |          >>> N(x, chop=True)\n",
      " |          0.000100000000000000\n",
      " |          >>> N(x, chop=1e-5)\n",
      " |          0.000100000000000000\n",
      " |          >>> N(x, chop=1e-4)\n",
      " |          0\n",
      " |      \n",
      " |      strict : bool, optional\n",
      " |          Raise ``PrecisionExhausted`` if any subresult fails to\n",
      " |          evaluate to full accuracy, given the available maxprec.\n",
      " |      \n",
      " |      quad : str, optional\n",
      " |          Choose algorithm for numerical quadrature. By default,\n",
      " |          tanh-sinh quadrature is used. For oscillatory\n",
      " |          integrals on an infinite interval, try ``quad='osc'``.\n",
      " |      \n",
      " |      verbose : bool, optional\n",
      " |          Print debug information.\n",
      " |      \n",
      " |      Notes\n",
      " |      =====\n",
      " |      \n",
      " |      When Floats are naively substituted into an expression,\n",
      " |      precision errors may adversely affect the result. For example,\n",
      " |      adding 1e16 (a Float) to 1 will truncate to 1e16; if 1e16 is\n",
      " |      then subtracted, the result will be 0.\n",
      " |      That is exactly what happens in the following:\n",
      " |      \n",
      " |      >>> from sympy.abc import x, y, z\n",
      " |      >>> values = {x: 1e16, y: 1, z: 1e16}\n",
      " |      >>> (x + y - z).subs(values)\n",
      " |      0\n",
      " |      \n",
      " |      Using the subs argument for evalf is the accurate way to\n",
      " |      evaluate such an expression:\n",
      " |      \n",
      " |      >>> (x + y - z).evalf(subs=values)\n",
      " |      1.00000000000000\n",
      " |  \n",
      " |  n = evalf(self, n=15, subs=None, maxn=100, chop=False, strict=False, quad=None, verbose=False)\n",
      "\n"
     ]
    }
   ],
   "source": [
    "help(Hyperbola)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 68,
   "id": "e1cd180f",
   "metadata": {},
   "outputs": [],
   "source": [
    "l=Line(y-(k*x+m))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 69,
   "id": "baf96ff4",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle - k x - m + y$"
      ],
      "text/plain": [
       "-k*x - m + y"
      ]
     },
     "execution_count": 69,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "l.equation()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 71,
   "id": "c0d15e3b",
   "metadata": {},
   "outputs": [],
   "source": [
    "a,b=symbols(\"a,b\",positive=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 75,
   "id": "7cea75b1",
   "metadata": {},
   "outputs": [],
   "source": [
    "h = Hyperbola(Point(0,0),a,b)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 76,
   "id": "a556f789",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle -1 - \\frac{y^{2}}{b^{2}} + \\frac{x^{2}}{a^{2}}$"
      ],
      "text/plain": [
       "-1 - y**2/b**2 + x**2/a**2"
      ]
     },
     "execution_count": 76,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "h.equation()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 77,
   "id": "a5487884",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle a^{2} b^{2} + 2 a^{2} k m x + a^{2} m^{2} + x^{2} \\left(a^{2} k^{2} - b^{2}\\right)$"
      ],
      "text/plain": [
       "a**2*b**2 + 2*a**2*k*m*x + a**2*m**2 + x**2*(a**2*k**2 - b**2)"
      ]
     },
     "execution_count": 77,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "line_and_quadratic(l,h)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 78,
   "id": "4d7e7343",
   "metadata": {},
   "outputs": [],
   "source": [
    "q=QuadraticFunction(_)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 79,
   "id": "aafd8dde",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle a^{2} b^{2} + 2 a^{2} k m x + a^{2} m^{2} + x^{2} \\left(a^{2} k^{2} - b^{2}\\right)$"
      ],
      "text/plain": [
       "a**2*b**2 + 2*a**2*k*m*x + a**2*m**2 + x**2*(a**2*k**2 - b**2)"
      ]
     },
     "execution_count": 79,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "q.equation()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 80,
   "id": "ce29b815",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle 4 a^{4} k^{2} m^{2} - \\left(a^{2} b^{2} + a^{2} m^{2}\\right) \\left(4 a^{2} k^{2} - 4 b^{2}\\right)$"
      ],
      "text/plain": [
       "4*a**4*k**2*m**2 - (a**2*b**2 + a**2*m**2)*(4*a**2*k**2 - 4*b**2)"
      ]
     },
     "execution_count": 80,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "q.delta"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 81,
   "id": "6abe46bf",
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle 4 a^{2} b^{2} \\left(- a^{2} k^{2} + b^{2} + m^{2}\\right)$"
      ],
      "text/plain": [
       "4*a**2*b**2*(-a**2*k**2 + b**2 + m**2)"
      ]
     },
     "execution_count": 81,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "simplify(_)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 84,
   "id": "c57807eb",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle a^{2} b^{2}$"
      ],
      "text/plain": [
       "a**2*b**2"
      ]
     },
     "execution_count": 84,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "q.equation(x).subs({m:0,k:b/a})"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 85,
   "id": "507240db",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\mathbb{R} \\cap \\left\\{- \\frac{a^{2} k m}{\\left(a k - b\\right) \\left(a k + b\\right)} - \\frac{a b \\sqrt{- a^{2} k^{2} + b^{2} + m^{2}}}{a^{2} k^{2} - b^{2}}, - \\frac{a^{2} k m}{\\left(a k - b\\right) \\left(a k + b\\right)} + \\frac{a b \\sqrt{- a^{2} k^{2} + b^{2} + m^{2}}}{a^{2} k^{2} - b^{2}}\\right\\}$"
      ],
      "text/plain": [
       "Intersection({-a**2*k*m/((a*k - b)*(a*k + b)) - a*b*sqrt(-a**2*k**2 + b**2 + m**2)/(a**2*k**2 - b**2), -a**2*k*m/((a*k - b)*(a*k + b)) + a*b*sqrt(-a**2*k**2 + b**2 + m**2)/(a**2*k**2 - b**2)}, Reals)"
      ]
     },
     "execution_count": 85,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "q.roots"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 86,
   "id": "05538e99",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\operatorname{Hyperbola}\\left(\\operatorname{Point2D}\\left(0, 0\\right), a, b, 0\\right)$"
      ],
      "text/plain": [
       "Hyperbola(Point2D(0, 0), a, b, 0)"
      ]
     },
     "execution_count": 86,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "h\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 90,
   "id": "29aca979",
   "metadata": {},
   "outputs": [],
   "source": [
    "P=h.arbitrary_point()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 93,
   "id": "ee147e46",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\operatorname{Point2D}\\left(\\frac{a}{\\cos{\\left(t \\right)}}, b \\tan{\\left(t \\right)}\\right)$"
      ],
      "text/plain": [
       "Point2D(a/cos(t), b*tan(t))"
      ]
     },
     "execution_count": 93,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "P"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 89,
   "id": "52eafcd6",
   "metadata": {},
   "outputs": [],
   "source": [
    "F1,F2=h.foci"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 91,
   "id": "ca04d335",
   "metadata": {},
   "outputs": [],
   "source": [
    "t=Triangle(P,F1,F2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 92,
   "id": "4dc3c0bc",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle b \\sqrt{a^{2} + b^{2}} \\tan{\\left(t \\right)}$"
      ],
      "text/plain": [
       "b*sqrt(a**2 + b**2)*tan(t)"
      ]
     },
     "execution_count": 92,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "t.area"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 101,
   "id": "cdd1e794",
   "metadata": {},
   "outputs": [],
   "source": [
    "k1=Line(P,F1).slope"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 102,
   "id": "4668fa6c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\frac{b \\sin{\\left(t \\right)}}{a + \\sqrt{a^{2} + b^{2}} \\cos{\\left(t \\right)}}$"
      ],
      "text/plain": [
       "b*sin(t)/(a + sqrt(a**2 + b**2)*cos(t))"
      ]
     },
     "execution_count": 102,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "k1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 103,
   "id": "07a6d7da",
   "metadata": {},
   "outputs": [],
   "source": [
    "k2=Line(P,F2).slope"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 104,
   "id": "f7a56e10",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\frac{b \\sin{\\left(t \\right)}}{a - \\sqrt{a^{2} + b^{2}} \\cos{\\left(t \\right)}}$"
      ],
      "text/plain": [
       "b*sin(t)/(a - sqrt(a**2 + b**2)*cos(t))"
      ]
     },
     "execution_count": 104,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "k2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 105,
   "id": "42783f88",
   "metadata": {},
   "outputs": [],
   "source": [
    "answer=(k2-k1)/(1+k1*k2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 106,
   "id": "d961f4d2",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\frac{2 b \\sqrt{a^{2} + b^{2}} \\sin{\\left(2 t \\right)}}{- a^{2} \\cos{\\left(2 t \\right)} + a^{2} - 2 b^{2} \\cos{\\left(2 t \\right)}}$"
      ],
      "text/plain": [
       "2*b*sqrt(a**2 + b**2)*sin(2*t)/(-a**2*cos(2*t) + a**2 - 2*b**2*cos(2*t))"
      ]
     },
     "execution_count": 106,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "simplify(answer)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 107,
   "id": "58c45ce1",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\frac{4 b \\sqrt{a^{2} + b^{2}} \\sin{\\left(t \\right)} \\cos{\\left(t \\right)}}{- a^{2} \\cdot \\left(2 \\cos^{2}{\\left(t \\right)} - 1\\right) + a^{2} - 2 b^{2} \\cdot \\left(2 \\cos^{2}{\\left(t \\right)} - 1\\right)}$"
      ],
      "text/plain": [
       "4*b*sqrt(a**2 + b**2)*sin(t)*cos(t)/(-a**2*(2*cos(t)**2 - 1) + a**2 - 2*b**2*(2*cos(t)**2 - 1))"
      ]
     },
     "execution_count": 107,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "expand_trig(_)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 113,
   "id": "81a99a6a",
   "metadata": {},
   "outputs": [],
   "source": [
    "p=symbols(\"p\",positive=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 114,
   "id": "d56858e8",
   "metadata": {},
   "outputs": [],
   "source": [
    "para=Parabola(Point(p/2,0),Line(x+p/2))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 115,
   "id": "0f940fe7",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle 2 p x - y^{2}$"
      ],
      "text/plain": [
       "2*p*x - y**2"
      ]
     },
     "execution_count": 115,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "para.equation()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 116,
   "id": "3365fd76",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle - k^{2} x^{2} - m^{2} + x \\left(- 2 k m + 2 p\\right)$"
      ],
      "text/plain": [
       "-k**2*x**2 - m**2 + x*(-2*k*m + 2*p)"
      ]
     },
     "execution_count": 116,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "line_and_quadratic(l,para)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "13fbc985",
   "metadata": {},
   "source": [
    "## 选择性必修二核心方案增改"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 120,
   "id": "f07fbdf3",
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Help on class Min in module sympy.functions.elementary.miscellaneous:\n",
      "\n",
      "class Min(MinMaxBase, sympy.core.function.Application)\n",
      " |  Min(*args)\n",
      " |  \n",
      " |  Return, if possible, the minimum value of the list.\n",
      " |  It is named ``Min`` and not ``min`` to avoid conflicts\n",
      " |  with the built-in function ``min``.\n",
      " |  \n",
      " |  Examples\n",
      " |  ========\n",
      " |  \n",
      " |  >>> from sympy import Min, Symbol, oo\n",
      " |  >>> from sympy.abc import x, y\n",
      " |  >>> p = Symbol('p', positive=True)\n",
      " |  >>> n = Symbol('n', negative=True)\n",
      " |  \n",
      " |  >>> Min(x, -2)\n",
      " |  Min(-2, x)\n",
      " |  >>> Min(x, -2).subs(x, 3)\n",
      " |  -2\n",
      " |  >>> Min(p, -3)\n",
      " |  -3\n",
      " |  >>> Min(x, y)\n",
      " |  Min(x, y)\n",
      " |  >>> Min(n, 8, p, -7, p, oo)\n",
      " |  Min(-7, n)\n",
      " |  \n",
      " |  See Also\n",
      " |  ========\n",
      " |  \n",
      " |  Max : find maximum values\n",
      " |  \n",
      " |  Method resolution order:\n",
      " |      Min\n",
      " |      MinMaxBase\n",
      " |      sympy.core.expr.Expr\n",
      " |      sympy.core.operations.LatticeOp\n",
      " |      sympy.core.operations.AssocOp\n",
      " |      sympy.core.function.Application\n",
      " |      sympy.core.basic.Basic\n",
      " |      sympy.printing.defaults.Printable\n",
      " |      sympy.core.evalf.EvalfMixin\n",
      " |      builtins.object\n",
      " |  \n",
      " |  Methods defined here:\n",
      " |  \n",
      " |  fdiff(self, argindex)\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Data and other attributes defined here:\n",
      " |  \n",
      " |  default_assumptions = {'commutative': True}\n",
      " |  \n",
      " |  identity = oo\n",
      " |  \n",
      " |  is_commutative = True\n",
      " |  \n",
      " |  zero = -oo\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Methods inherited from MinMaxBase:\n",
      " |  \n",
      " |  evalf(self, n=15, **options)\n",
      " |      Evaluate the given formula to an accuracy of *n* digits.\n",
      " |      \n",
      " |      Parameters\n",
      " |      ==========\n",
      " |      \n",
      " |      subs : dict, optional\n",
      " |          Substitute numerical values for symbols, e.g.\n",
      " |          ``subs={x:3, y:1+pi}``. The substitutions must be given as a\n",
      " |          dictionary.\n",
      " |      \n",
      " |      maxn : int, optional\n",
      " |          Allow a maximum temporary working precision of maxn digits.\n",
      " |      \n",
      " |      chop : bool or number, optional\n",
      " |          Specifies how to replace tiny real or imaginary parts in\n",
      " |          subresults by exact zeros.\n",
      " |      \n",
      " |          When ``True`` the chop value defaults to standard precision.\n",
      " |      \n",
      " |          Otherwise the chop value is used to determine the\n",
      " |          magnitude of \"small\" for purposes of chopping.\n",
      " |      \n",
      " |          >>> from sympy import N\n",
      " |          >>> x = 1e-4\n",
      " |          >>> N(x, chop=True)\n",
      " |          0.000100000000000000\n",
      " |          >>> N(x, chop=1e-5)\n",
      " |          0.000100000000000000\n",
      " |          >>> N(x, chop=1e-4)\n",
      " |          0\n",
      " |      \n",
      " |      strict : bool, optional\n",
      " |          Raise ``PrecisionExhausted`` if any subresult fails to\n",
      " |          evaluate to full accuracy, given the available maxprec.\n",
      " |      \n",
      " |      quad : str, optional\n",
      " |          Choose algorithm for numerical quadrature. By default,\n",
      " |          tanh-sinh quadrature is used. For oscillatory\n",
      " |          integrals on an infinite interval, try ``quad='osc'``.\n",
      " |      \n",
      " |      verbose : bool, optional\n",
      " |          Print debug information.\n",
      " |      \n",
      " |      Notes\n",
      " |      =====\n",
      " |      \n",
      " |      When Floats are naively substituted into an expression,\n",
      " |      precision errors may adversely affect the result. For example,\n",
      " |      adding 1e16 (a Float) to 1 will truncate to 1e16; if 1e16 is\n",
      " |      then subtracted, the result will be 0.\n",
      " |      That is exactly what happens in the following:\n",
      " |      \n",
      " |      >>> from sympy.abc import x, y, z\n",
      " |      >>> values = {x: 1e16, y: 1, z: 1e16}\n",
      " |      >>> (x + y - z).subs(values)\n",
      " |      0\n",
      " |      \n",
      " |      Using the subs argument for evalf is the accurate way to\n",
      " |      evaluate such an expression:\n",
      " |      \n",
      " |      >>> (x + y - z).evalf(subs=values)\n",
      " |      1.00000000000000\n",
      " |  \n",
      " |  n(self, *args, **kwargs)\n",
      " |      Evaluate the given formula to an accuracy of *n* digits.\n",
      " |      \n",
      " |      Parameters\n",
      " |      ==========\n",
      " |      \n",
      " |      subs : dict, optional\n",
      " |          Substitute numerical values for symbols, e.g.\n",
      " |          ``subs={x:3, y:1+pi}``. The substitutions must be given as a\n",
      " |          dictionary.\n",
      " |      \n",
      " |      maxn : int, optional\n",
      " |          Allow a maximum temporary working precision of maxn digits.\n",
      " |      \n",
      " |      chop : bool or number, optional\n",
      " |          Specifies how to replace tiny real or imaginary parts in\n",
      " |          subresults by exact zeros.\n",
      " |      \n",
      " |          When ``True`` the chop value defaults to standard precision.\n",
      " |      \n",
      " |          Otherwise the chop value is used to determine the\n",
      " |          magnitude of \"small\" for purposes of chopping.\n",
      " |      \n",
      " |          >>> from sympy import N\n",
      " |          >>> x = 1e-4\n",
      " |          >>> N(x, chop=True)\n",
      " |          0.000100000000000000\n",
      " |          >>> N(x, chop=1e-5)\n",
      " |          0.000100000000000000\n",
      " |          >>> N(x, chop=1e-4)\n",
      " |          0\n",
      " |      \n",
      " |      strict : bool, optional\n",
      " |          Raise ``PrecisionExhausted`` if any subresult fails to\n",
      " |          evaluate to full accuracy, given the available maxprec.\n",
      " |      \n",
      " |      quad : str, optional\n",
      " |          Choose algorithm for numerical quadrature. By default,\n",
      " |          tanh-sinh quadrature is used. For oscillatory\n",
      " |          integrals on an infinite interval, try ``quad='osc'``.\n",
      " |      \n",
      " |      verbose : bool, optional\n",
      " |          Print debug information.\n",
      " |      \n",
      " |      Notes\n",
      " |      =====\n",
      " |      \n",
      " |      When Floats are naively substituted into an expression,\n",
      " |      precision errors may adversely affect the result. For example,\n",
      " |      adding 1e16 (a Float) to 1 will truncate to 1e16; if 1e16 is\n",
      " |      then subtracted, the result will be 0.\n",
      " |      That is exactly what happens in the following:\n",
      " |      \n",
      " |      >>> from sympy.abc import x, y, z\n",
      " |      >>> values = {x: 1e16, y: 1, z: 1e16}\n",
      " |      >>> (x + y - z).subs(values)\n",
      " |      0\n",
      " |      \n",
      " |      Using the subs argument for evalf is the accurate way to\n",
      " |      evaluate such an expression:\n",
      " |      \n",
      " |      >>> (x + y - z).evalf(subs=values)\n",
      " |      1.00000000000000\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Static methods inherited from MinMaxBase:\n",
      " |  \n",
      " |  __new__(cls, *args, **assumptions)\n",
      " |      Create and return a new object.  See help(type) for accurate signature.\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Methods inherited from sympy.core.expr.Expr:\n",
      " |  \n",
      " |  __abs__(self) -> 'Expr'\n",
      " |  \n",
      " |  __add__(self, other)\n",
      " |  \n",
      " |  __complex__(self)\n",
      " |  \n",
      " |  __divmod__(self, other)\n",
      " |  \n",
      " |  __float__(self)\n",
      " |  \n",
      " |  __floordiv__(self, other)\n",
      " |  \n",
      " |  __format__(self, format_spec: 'str')\n",
      " |      Default object formatter.\n",
      " |  \n",
      " |  __ge__(self, other)\n",
      " |      Return self>=value.\n",
      " |  \n",
      " |  __gt__(self, other)\n",
      " |      Return self>value.\n",
      " |  \n",
      " |  __int__(self)\n",
      " |  \n",
      " |  __le__(self, other)\n",
      " |      Return self<=value.\n",
      " |  \n",
      " |  __lt__(self, other)\n",
      " |      Return self<value.\n",
      " |  \n",
      " |  __mod__(self, other)\n",
      " |  \n",
      " |  __mul__(self, other)\n",
      " |  \n",
      " |  __neg__(self)\n",
      " |  \n",
      " |  __pos__(self)\n",
      " |  \n",
      " |  __pow__(self, other, mod=None) -> 'Expr'\n",
      " |  \n",
      " |  __radd__(self, other)\n",
      " |  \n",
      " |  __rdivmod__(self, other)\n",
      " |  \n",
      " |  __rfloordiv__(self, other)\n",
      " |  \n",
      " |  __rmod__(self, other)\n",
      " |  \n",
      " |  __rmul__(self, other)\n",
      " |  \n",
      " |  __round__ = round(self, n=None)\n",
      " |  \n",
      " |  __rpow__(self, other)\n",
      " |  \n",
      " |  __rsub__(self, other)\n",
      " |  \n",
      " |  __rtruediv__(self, other)\n",
      " |  \n",
      " |  __sub__(self, other)\n",
      " |  \n",
      " |  __truediv__(self, other)\n",
      " |  \n",
      " |  __trunc__(self)\n",
      " |  \n",
      " |  adjoint(self)\n",
      " |  \n",
      " |  apart(self, x=None, **args)\n",
      " |      See the apart function in sympy.polys\n",
      " |  \n",
      " |  args_cnc(self, cset=False, warn=True, split_1=True)\n",
      " |      Return [commutative factors, non-commutative factors] of self.\n",
      " |      \n",
      " |      Explanation\n",
      " |      ===========\n",
      " |      \n",
      " |      self is treated as a Mul and the ordering of the factors is maintained.\n",
      " |      If ``cset`` is True the commutative factors will be returned in a set.\n",
      " |      If there were repeated factors (as may happen with an unevaluated Mul)\n",
      " |      then an error will be raised unless it is explicitly suppressed by\n",
      " |      setting ``warn`` to False.\n",
      " |      \n",
      " |      Note: -1 is always separated from a Number unless split_1 is False.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import symbols, oo\n",
      " |      >>> A, B = symbols('A B', commutative=0)\n",
      " |      >>> x, y = symbols('x y')\n",
      " |      >>> (-2*x*y).args_cnc()\n",
      " |      [[-1, 2, x, y], []]\n",
      " |      >>> (-2.5*x).args_cnc()\n",
      " |      [[-1, 2.5, x], []]\n",
      " |      >>> (-2*x*A*B*y).args_cnc()\n",
      " |      [[-1, 2, x, y], [A, B]]\n",
      " |      >>> (-2*x*A*B*y).args_cnc(split_1=False)\n",
      " |      [[-2, x, y], [A, B]]\n",
      " |      >>> (-2*x*y).args_cnc(cset=True)\n",
      " |      [{-1, 2, x, y}, []]\n",
      " |      \n",
      " |      The arg is always treated as a Mul:\n",
      " |      \n",
      " |      >>> (-2 + x + A).args_cnc()\n",
      " |      [[], [x - 2 + A]]\n",
      " |      >>> (-oo).args_cnc() # -oo is a singleton\n",
      " |      [[-1, oo], []]\n",
      " |  \n",
      " |  as_base_exp(self) -> 'tuple[Expr, Expr]'\n",
      " |  \n",
      " |  as_coeff_Add(self, rational=False) -> \"tuple['Number', Expr]\"\n",
      " |      Efficiently extract the coefficient of a summation.\n",
      " |  \n",
      " |  as_coeff_Mul(self, rational: 'bool' = False) -> \"tuple['Number', Expr]\"\n",
      " |      Efficiently extract the coefficient of a product.\n",
      " |  \n",
      " |  as_coeff_add(self, *deps) -> 'tuple[Expr, tuple[Expr, ...]]'\n",
      " |      Return the tuple (c, args) where self is written as an Add, ``a``.\n",
      " |      \n",
      " |      c should be a Rational added to any terms of the Add that are\n",
      " |      independent of deps.\n",
      " |      \n",
      " |      args should be a tuple of all other terms of ``a``; args is empty\n",
      " |      if self is a Number or if self is independent of deps (when given).\n",
      " |      \n",
      " |      This should be used when you do not know if self is an Add or not but\n",
      " |      you want to treat self as an Add or if you want to process the\n",
      " |      individual arguments of the tail of self as an Add.\n",
      " |      \n",
      " |      - if you know self is an Add and want only the head, use self.args[0];\n",
      " |      - if you do not want to process the arguments of the tail but need the\n",
      " |        tail then use self.as_two_terms() which gives the head and tail.\n",
      " |      - if you want to split self into an independent and dependent parts\n",
      " |        use ``self.as_independent(*deps)``\n",
      " |      \n",
      " |      >>> from sympy import S\n",
      " |      >>> from sympy.abc import x, y\n",
      " |      >>> (S(3)).as_coeff_add()\n",
      " |      (3, ())\n",
      " |      >>> (3 + x).as_coeff_add()\n",
      " |      (3, (x,))\n",
      " |      >>> (3 + x + y).as_coeff_add(x)\n",
      " |      (y + 3, (x,))\n",
      " |      >>> (3 + y).as_coeff_add(x)\n",
      " |      (y + 3, ())\n",
      " |  \n",
      " |  as_coeff_exponent(self, x) -> 'tuple[Expr, Expr]'\n",
      " |      ``c*x**e -> c,e`` where x can be any symbolic expression.\n",
      " |  \n",
      " |  as_coeff_mul(self, *deps, **kwargs) -> 'tuple[Expr, tuple[Expr, ...]]'\n",
      " |      Return the tuple (c, args) where self is written as a Mul, ``m``.\n",
      " |      \n",
      " |      c should be a Rational multiplied by any factors of the Mul that are\n",
      " |      independent of deps.\n",
      " |      \n",
      " |      args should be a tuple of all other factors of m; args is empty\n",
      " |      if self is a Number or if self is independent of deps (when given).\n",
      " |      \n",
      " |      This should be used when you do not know if self is a Mul or not but\n",
      " |      you want to treat self as a Mul or if you want to process the\n",
      " |      individual arguments of the tail of self as a Mul.\n",
      " |      \n",
      " |      - if you know self is a Mul and want only the head, use self.args[0];\n",
      " |      - if you do not want to process the arguments of the tail but need the\n",
      " |        tail then use self.as_two_terms() which gives the head and tail;\n",
      " |      - if you want to split self into an independent and dependent parts\n",
      " |        use ``self.as_independent(*deps)``\n",
      " |      \n",
      " |      >>> from sympy import S\n",
      " |      >>> from sympy.abc import x, y\n",
      " |      >>> (S(3)).as_coeff_mul()\n",
      " |      (3, ())\n",
      " |      >>> (3*x*y).as_coeff_mul()\n",
      " |      (3, (x, y))\n",
      " |      >>> (3*x*y).as_coeff_mul(x)\n",
      " |      (3*y, (x,))\n",
      " |      >>> (3*y).as_coeff_mul(x)\n",
      " |      (3*y, ())\n",
      " |  \n",
      " |  as_coefficient(self, expr)\n",
      " |      Extracts symbolic coefficient at the given expression. In\n",
      " |      other words, this functions separates 'self' into the product\n",
      " |      of 'expr' and 'expr'-free coefficient. If such separation\n",
      " |      is not possible it will return None.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import E, pi, sin, I, Poly\n",
      " |      >>> from sympy.abc import x\n",
      " |      \n",
      " |      >>> E.as_coefficient(E)\n",
      " |      1\n",
      " |      >>> (2*E).as_coefficient(E)\n",
      " |      2\n",
      " |      >>> (2*sin(E)*E).as_coefficient(E)\n",
      " |      \n",
      " |      Two terms have E in them so a sum is returned. (If one were\n",
      " |      desiring the coefficient of the term exactly matching E then\n",
      " |      the constant from the returned expression could be selected.\n",
      " |      Or, for greater precision, a method of Poly can be used to\n",
      " |      indicate the desired term from which the coefficient is\n",
      " |      desired.)\n",
      " |      \n",
      " |      >>> (2*E + x*E).as_coefficient(E)\n",
      " |      x + 2\n",
      " |      >>> _.args[0]  # just want the exact match\n",
      " |      2\n",
      " |      >>> p = Poly(2*E + x*E); p\n",
      " |      Poly(x*E + 2*E, x, E, domain='ZZ')\n",
      " |      >>> p.coeff_monomial(E)\n",
      " |      2\n",
      " |      >>> p.nth(0, 1)\n",
      " |      2\n",
      " |      \n",
      " |      Since the following cannot be written as a product containing\n",
      " |      E as a factor, None is returned. (If the coefficient ``2*x`` is\n",
      " |      desired then the ``coeff`` method should be used.)\n",
      " |      \n",
      " |      >>> (2*E*x + x).as_coefficient(E)\n",
      " |      >>> (2*E*x + x).coeff(E)\n",
      " |      2*x\n",
      " |      \n",
      " |      >>> (E*(x + 1) + x).as_coefficient(E)\n",
      " |      \n",
      " |      >>> (2*pi*I).as_coefficient(pi*I)\n",
      " |      2\n",
      " |      >>> (2*I).as_coefficient(pi*I)\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      coeff: return sum of terms have a given factor\n",
      " |      as_coeff_Add: separate the additive constant from an expression\n",
      " |      as_coeff_Mul: separate the multiplicative constant from an expression\n",
      " |      as_independent: separate x-dependent terms/factors from others\n",
      " |      sympy.polys.polytools.Poly.coeff_monomial: efficiently find the single coefficient of a monomial in Poly\n",
      " |      sympy.polys.polytools.Poly.nth: like coeff_monomial but powers of monomial terms are used\n",
      " |  \n",
      " |  as_coefficients_dict(self, *syms)\n",
      " |      Return a dictionary mapping terms to their Rational coefficient.\n",
      " |      Since the dictionary is a defaultdict, inquiries about terms which\n",
      " |      were not present will return a coefficient of 0.\n",
      " |      \n",
      " |      If symbols ``syms`` are provided, any multiplicative terms\n",
      " |      independent of them will be considered a coefficient and a\n",
      " |      regular dictionary of syms-dependent generators as keys and\n",
      " |      their corresponding coefficients as values will be returned.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy.abc import a, x, y\n",
      " |      >>> (3*x + a*x + 4).as_coefficients_dict()\n",
      " |      {1: 4, x: 3, a*x: 1}\n",
      " |      >>> _[a]\n",
      " |      0\n",
      " |      >>> (3*a*x).as_coefficients_dict()\n",
      " |      {a*x: 3}\n",
      " |      >>> (3*a*x).as_coefficients_dict(x)\n",
      " |      {x: 3*a}\n",
      " |      >>> (3*a*x).as_coefficients_dict(y)\n",
      " |      {1: 3*a*x}\n",
      " |  \n",
      " |  as_content_primitive(self, radical=False, clear=True)\n",
      " |      This method should recursively remove a Rational from all arguments\n",
      " |      and return that (content) and the new self (primitive). The content\n",
      " |      should always be positive and ``Mul(*foo.as_content_primitive()) == foo``.\n",
      " |      The primitive need not be in canonical form and should try to preserve\n",
      " |      the underlying structure if possible (i.e. expand_mul should not be\n",
      " |      applied to self).\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import sqrt\n",
      " |      >>> from sympy.abc import x, y, z\n",
      " |      \n",
      " |      >>> eq = 2 + 2*x + 2*y*(3 + 3*y)\n",
      " |      \n",
      " |      The as_content_primitive function is recursive and retains structure:\n",
      " |      \n",
      " |      >>> eq.as_content_primitive()\n",
      " |      (2, x + 3*y*(y + 1) + 1)\n",
      " |      \n",
      " |      Integer powers will have Rationals extracted from the base:\n",
      " |      \n",
      " |      >>> ((2 + 6*x)**2).as_content_primitive()\n",
      " |      (4, (3*x + 1)**2)\n",
      " |      >>> ((2 + 6*x)**(2*y)).as_content_primitive()\n",
      " |      (1, (2*(3*x + 1))**(2*y))\n",
      " |      \n",
      " |      Terms may end up joining once their as_content_primitives are added:\n",
      " |      \n",
      " |      >>> ((5*(x*(1 + y)) + 2*x*(3 + 3*y))).as_content_primitive()\n",
      " |      (11, x*(y + 1))\n",
      " |      >>> ((3*(x*(1 + y)) + 2*x*(3 + 3*y))).as_content_primitive()\n",
      " |      (9, x*(y + 1))\n",
      " |      >>> ((3*(z*(1 + y)) + 2.0*x*(3 + 3*y))).as_content_primitive()\n",
      " |      (1, 6.0*x*(y + 1) + 3*z*(y + 1))\n",
      " |      >>> ((5*(x*(1 + y)) + 2*x*(3 + 3*y))**2).as_content_primitive()\n",
      " |      (121, x**2*(y + 1)**2)\n",
      " |      >>> ((x*(1 + y) + 0.4*x*(3 + 3*y))**2).as_content_primitive()\n",
      " |      (1, 4.84*x**2*(y + 1)**2)\n",
      " |      \n",
      " |      Radical content can also be factored out of the primitive:\n",
      " |      \n",
      " |      >>> (2*sqrt(2) + 4*sqrt(10)).as_content_primitive(radical=True)\n",
      " |      (2, sqrt(2)*(1 + 2*sqrt(5)))\n",
      " |      \n",
      " |      If clear=False (default is True) then content will not be removed\n",
      " |      from an Add if it can be distributed to leave one or more\n",
      " |      terms with integer coefficients.\n",
      " |      \n",
      " |      >>> (x/2 + y).as_content_primitive()\n",
      " |      (1/2, x + 2*y)\n",
      " |      >>> (x/2 + y).as_content_primitive(clear=False)\n",
      " |      (1, x/2 + y)\n",
      " |  \n",
      " |  as_expr(self, *gens)\n",
      " |      Convert a polynomial to a SymPy expression.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import sin\n",
      " |      >>> from sympy.abc import x, y\n",
      " |      \n",
      " |      >>> f = (x**2 + x*y).as_poly(x, y)\n",
      " |      >>> f.as_expr()\n",
      " |      x**2 + x*y\n",
      " |      \n",
      " |      >>> sin(x).as_expr()\n",
      " |      sin(x)\n",
      " |  \n",
      " |  as_independent(self, *deps, **hint) -> 'tuple[Expr, Expr]'\n",
      " |      A mostly naive separation of a Mul or Add into arguments that are not\n",
      " |      are dependent on deps. To obtain as complete a separation of variables\n",
      " |      as possible, use a separation method first, e.g.:\n",
      " |      \n",
      " |      * separatevars() to change Mul, Add and Pow (including exp) into Mul\n",
      " |      * .expand(mul=True) to change Add or Mul into Add\n",
      " |      * .expand(log=True) to change log expr into an Add\n",
      " |      \n",
      " |      The only non-naive thing that is done here is to respect noncommutative\n",
      " |      ordering of variables and to always return (0, 0) for `self` of zero\n",
      " |      regardless of hints.\n",
      " |      \n",
      " |      For nonzero `self`, the returned tuple (i, d) has the\n",
      " |      following interpretation:\n",
      " |      \n",
      " |      * i will has no variable that appears in deps\n",
      " |      * d will either have terms that contain variables that are in deps, or\n",
      " |        be equal to 0 (when self is an Add) or 1 (when self is a Mul)\n",
      " |      * if self is an Add then self = i + d\n",
      " |      * if self is a Mul then self = i*d\n",
      " |      * otherwise (self, S.One) or (S.One, self) is returned.\n",
      " |      \n",
      " |      To force the expression to be treated as an Add, use the hint as_Add=True\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      -- self is an Add\n",
      " |      \n",
      " |      >>> from sympy import sin, cos, exp\n",
      " |      >>> from sympy.abc import x, y, z\n",
      " |      \n",
      " |      >>> (x + x*y).as_independent(x)\n",
      " |      (0, x*y + x)\n",
      " |      >>> (x + x*y).as_independent(y)\n",
      " |      (x, x*y)\n",
      " |      >>> (2*x*sin(x) + y + x + z).as_independent(x)\n",
      " |      (y + z, 2*x*sin(x) + x)\n",
      " |      >>> (2*x*sin(x) + y + x + z).as_independent(x, y)\n",
      " |      (z, 2*x*sin(x) + x + y)\n",
      " |      \n",
      " |      -- self is a Mul\n",
      " |      \n",
      " |      >>> (x*sin(x)*cos(y)).as_independent(x)\n",
      " |      (cos(y), x*sin(x))\n",
      " |      \n",
      " |      non-commutative terms cannot always be separated out when self is a Mul\n",
      " |      \n",
      " |      >>> from sympy import symbols\n",
      " |      >>> n1, n2, n3 = symbols('n1 n2 n3', commutative=False)\n",
      " |      >>> (n1 + n1*n2).as_independent(n2)\n",
      " |      (n1, n1*n2)\n",
      " |      >>> (n2*n1 + n1*n2).as_independent(n2)\n",
      " |      (0, n1*n2 + n2*n1)\n",
      " |      >>> (n1*n2*n3).as_independent(n1)\n",
      " |      (1, n1*n2*n3)\n",
      " |      >>> (n1*n2*n3).as_independent(n2)\n",
      " |      (n1, n2*n3)\n",
      " |      >>> ((x-n1)*(x-y)).as_independent(x)\n",
      " |      (1, (x - y)*(x - n1))\n",
      " |      \n",
      " |      -- self is anything else:\n",
      " |      \n",
      " |      >>> (sin(x)).as_independent(x)\n",
      " |      (1, sin(x))\n",
      " |      >>> (sin(x)).as_independent(y)\n",
      " |      (sin(x), 1)\n",
      " |      >>> exp(x+y).as_independent(x)\n",
      " |      (1, exp(x + y))\n",
      " |      \n",
      " |      -- force self to be treated as an Add:\n",
      " |      \n",
      " |      >>> (3*x).as_independent(x, as_Add=True)\n",
      " |      (0, 3*x)\n",
      " |      \n",
      " |      -- force self to be treated as a Mul:\n",
      " |      \n",
      " |      >>> (3+x).as_independent(x, as_Add=False)\n",
      " |      (1, x + 3)\n",
      " |      >>> (-3+x).as_independent(x, as_Add=False)\n",
      " |      (1, x - 3)\n",
      " |      \n",
      " |      Note how the below differs from the above in making the\n",
      " |      constant on the dep term positive.\n",
      " |      \n",
      " |      >>> (y*(-3+x)).as_independent(x)\n",
      " |      (y, x - 3)\n",
      " |      \n",
      " |      -- use .as_independent() for true independence testing instead\n",
      " |         of .has(). The former considers only symbols in the free\n",
      " |         symbols while the latter considers all symbols\n",
      " |      \n",
      " |      >>> from sympy import Integral\n",
      " |      >>> I = Integral(x, (x, 1, 2))\n",
      " |      >>> I.has(x)\n",
      " |      True\n",
      " |      >>> x in I.free_symbols\n",
      " |      False\n",
      " |      >>> I.as_independent(x) == (I, 1)\n",
      " |      True\n",
      " |      >>> (I + x).as_independent(x) == (I, x)\n",
      " |      True\n",
      " |      \n",
      " |      Note: when trying to get independent terms, a separation method\n",
      " |      might need to be used first. In this case, it is important to keep\n",
      " |      track of what you send to this routine so you know how to interpret\n",
      " |      the returned values\n",
      " |      \n",
      " |      >>> from sympy import separatevars, log\n",
      " |      >>> separatevars(exp(x+y)).as_independent(x)\n",
      " |      (exp(y), exp(x))\n",
      " |      >>> (x + x*y).as_independent(y)\n",
      " |      (x, x*y)\n",
      " |      >>> separatevars(x + x*y).as_independent(y)\n",
      " |      (x, y + 1)\n",
      " |      >>> (x*(1 + y)).as_independent(y)\n",
      " |      (x, y + 1)\n",
      " |      >>> (x*(1 + y)).expand(mul=True).as_independent(y)\n",
      " |      (x, x*y)\n",
      " |      >>> a, b=symbols('a b', positive=True)\n",
      " |      >>> (log(a*b).expand(log=True)).as_independent(b)\n",
      " |      (log(a), log(b))\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      separatevars\n",
      " |      expand_log\n",
      " |      sympy.core.add.Add.as_two_terms\n",
      " |      sympy.core.mul.Mul.as_two_terms\n",
      " |      as_coeff_mul\n",
      " |  \n",
      " |  as_leading_term(self, *symbols, logx=None, cdir=0)\n",
      " |      Returns the leading (nonzero) term of the series expansion of self.\n",
      " |      \n",
      " |      The _eval_as_leading_term routines are used to do this, and they must\n",
      " |      always return a non-zero value.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy.abc import x\n",
      " |      >>> (1 + x + x**2).as_leading_term(x)\n",
      " |      1\n",
      " |      >>> (1/x**2 + x + x**2).as_leading_term(x)\n",
      " |      x**(-2)\n",
      " |  \n",
      " |  as_numer_denom(self)\n",
      " |      Return the numerator and the denominator of an expression.\n",
      " |      \n",
      " |      expression -> a/b -> a, b\n",
      " |      \n",
      " |      This is just a stub that should be defined by\n",
      " |      an object's class methods to get anything else.\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      normal: return ``a/b`` instead of ``(a, b)``\n",
      " |  \n",
      " |  as_ordered_factors(self, order=None)\n",
      " |      Return list of ordered factors (if Mul) else [self].\n",
      " |  \n",
      " |  as_ordered_terms(self, order=None, data=False)\n",
      " |      Transform an expression to an ordered list of terms.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import sin, cos\n",
      " |      >>> from sympy.abc import x\n",
      " |      \n",
      " |      >>> (sin(x)**2*cos(x) + sin(x)**2 + 1).as_ordered_terms()\n",
      " |      [sin(x)**2*cos(x), sin(x)**2, 1]\n",
      " |  \n",
      " |  as_poly(self, *gens, **args)\n",
      " |      Converts ``self`` to a polynomial or returns ``None``.\n",
      " |      \n",
      " |      Explanation\n",
      " |      ===========\n",
      " |      \n",
      " |      >>> from sympy import sin\n",
      " |      >>> from sympy.abc import x, y\n",
      " |      \n",
      " |      >>> print((x**2 + x*y).as_poly())\n",
      " |      Poly(x**2 + x*y, x, y, domain='ZZ')\n",
      " |      \n",
      " |      >>> print((x**2 + x*y).as_poly(x, y))\n",
      " |      Poly(x**2 + x*y, x, y, domain='ZZ')\n",
      " |      \n",
      " |      >>> print((x**2 + sin(y)).as_poly(x, y))\n",
      " |      None\n",
      " |  \n",
      " |  as_powers_dict(self)\n",
      " |      Return self as a dictionary of factors with each factor being\n",
      " |      treated as a power. The keys are the bases of the factors and the\n",
      " |      values, the corresponding exponents. The resulting dictionary should\n",
      " |      be used with caution if the expression is a Mul and contains non-\n",
      " |      commutative factors since the order that they appeared will be lost in\n",
      " |      the dictionary.\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      as_ordered_factors: An alternative for noncommutative applications,\n",
      " |                          returning an ordered list of factors.\n",
      " |      args_cnc: Similar to as_ordered_factors, but guarantees separation\n",
      " |                of commutative and noncommutative factors.\n",
      " |  \n",
      " |  as_real_imag(self, deep=True, **hints)\n",
      " |      Performs complex expansion on 'self' and returns a tuple\n",
      " |      containing collected both real and imaginary parts. This\n",
      " |      method cannot be confused with re() and im() functions,\n",
      " |      which does not perform complex expansion at evaluation.\n",
      " |      \n",
      " |      However it is possible to expand both re() and im()\n",
      " |      functions and get exactly the same results as with\n",
      " |      a single call to this function.\n",
      " |      \n",
      " |      >>> from sympy import symbols, I\n",
      " |      \n",
      " |      >>> x, y = symbols('x,y', real=True)\n",
      " |      \n",
      " |      >>> (x + y*I).as_real_imag()\n",
      " |      (x, y)\n",
      " |      \n",
      " |      >>> from sympy.abc import z, w\n",
      " |      \n",
      " |      >>> (z + w*I).as_real_imag()\n",
      " |      (re(z) - im(w), re(w) + im(z))\n",
      " |  \n",
      " |  as_terms(self)\n",
      " |      Transform an expression to a list of terms.\n",
      " |  \n",
      " |  aseries(self, x=None, n=6, bound=0, hir=False)\n",
      " |      Asymptotic Series expansion of self.\n",
      " |      This is equivalent to ``self.series(x, oo, n)``.\n",
      " |      \n",
      " |      Parameters\n",
      " |      ==========\n",
      " |      \n",
      " |      self : Expression\n",
      " |             The expression whose series is to be expanded.\n",
      " |      \n",
      " |      x : Symbol\n",
      " |          It is the variable of the expression to be calculated.\n",
      " |      \n",
      " |      n : Value\n",
      " |          The value used to represent the order in terms of ``x**n``,\n",
      " |          up to which the series is to be expanded.\n",
      " |      \n",
      " |      hir : Boolean\n",
      " |            Set this parameter to be True to produce hierarchical series.\n",
      " |            It stops the recursion at an early level and may provide nicer\n",
      " |            and more useful results.\n",
      " |      \n",
      " |      bound : Value, Integer\n",
      " |              Use the ``bound`` parameter to give limit on rewriting\n",
      " |              coefficients in its normalised form.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import sin, exp\n",
      " |      >>> from sympy.abc import x\n",
      " |      \n",
      " |      >>> e = sin(1/x + exp(-x)) - sin(1/x)\n",
      " |      \n",
      " |      >>> e.aseries(x)\n",
      " |      (1/(24*x**4) - 1/(2*x**2) + 1 + O(x**(-6), (x, oo)))*exp(-x)\n",
      " |      \n",
      " |      >>> e.aseries(x, n=3, hir=True)\n",
      " |      -exp(-2*x)*sin(1/x)/2 + exp(-x)*cos(1/x) + O(exp(-3*x), (x, oo))\n",
      " |      \n",
      " |      >>> e = exp(exp(x)/(1 - 1/x))\n",
      " |      \n",
      " |      >>> e.aseries(x)\n",
      " |      exp(exp(x)/(1 - 1/x))\n",
      " |      \n",
      " |      >>> e.aseries(x, bound=3) # doctest: +SKIP\n",
      " |      exp(exp(x)/x**2)*exp(exp(x)/x)*exp(-exp(x) + exp(x)/(1 - 1/x) - exp(x)/x - exp(x)/x**2)*exp(exp(x))\n",
      " |      \n",
      " |      For rational expressions this method may return original expression without the Order term.\n",
      " |      >>> (1/x).aseries(x, n=8)\n",
      " |      1/x\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      Expr\n",
      " |          Asymptotic series expansion of the expression.\n",
      " |      \n",
      " |      Notes\n",
      " |      =====\n",
      " |      \n",
      " |      This algorithm is directly induced from the limit computational algorithm provided by Gruntz.\n",
      " |      It majorly uses the mrv and rewrite sub-routines. The overall idea of this algorithm is first\n",
      " |      to look for the most rapidly varying subexpression w of a given expression f and then expands f\n",
      " |      in a series in w. Then same thing is recursively done on the leading coefficient\n",
      " |      till we get constant coefficients.\n",
      " |      \n",
      " |      If the most rapidly varying subexpression of a given expression f is f itself,\n",
      " |      the algorithm tries to find a normalised representation of the mrv set and rewrites f\n",
      " |      using this normalised representation.\n",
      " |      \n",
      " |      If the expansion contains an order term, it will be either ``O(x ** (-n))`` or ``O(w ** (-n))``\n",
      " |      where ``w`` belongs to the most rapidly varying expression of ``self``.\n",
      " |      \n",
      " |      References\n",
      " |      ==========\n",
      " |      \n",
      " |      .. [1] Gruntz, Dominik. A new algorithm for computing asymptotic series.\n",
      " |             In: Proc. 1993 Int. Symp. Symbolic and Algebraic Computation. 1993.\n",
      " |             pp. 239-244.\n",
      " |      .. [2] Gruntz thesis - p90\n",
      " |      .. [3] https://en.wikipedia.org/wiki/Asymptotic_expansion\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      Expr.aseries: See the docstring of this function for complete details of this wrapper.\n",
      " |  \n",
      " |  cancel(self, *gens, **args)\n",
      " |      See the cancel function in sympy.polys\n",
      " |  \n",
      " |  coeff(self, x, n=1, right=False, _first=True)\n",
      " |      Returns the coefficient from the term(s) containing ``x**n``. If ``n``\n",
      " |      is zero then all terms independent of ``x`` will be returned.\n",
      " |      \n",
      " |      Explanation\n",
      " |      ===========\n",
      " |      \n",
      " |      When ``x`` is noncommutative, the coefficient to the left (default) or\n",
      " |      right of ``x`` can be returned. The keyword 'right' is ignored when\n",
      " |      ``x`` is commutative.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import symbols\n",
      " |      >>> from sympy.abc import x, y, z\n",
      " |      \n",
      " |      You can select terms that have an explicit negative in front of them:\n",
      " |      \n",
      " |      >>> (-x + 2*y).coeff(-1)\n",
      " |      x\n",
      " |      >>> (x - 2*y).coeff(-1)\n",
      " |      2*y\n",
      " |      \n",
      " |      You can select terms with no Rational coefficient:\n",
      " |      \n",
      " |      >>> (x + 2*y).coeff(1)\n",
      " |      x\n",
      " |      >>> (3 + 2*x + 4*x**2).coeff(1)\n",
      " |      0\n",
      " |      \n",
      " |      You can select terms independent of x by making n=0; in this case\n",
      " |      expr.as_independent(x)[0] is returned (and 0 will be returned instead\n",
      " |      of None):\n",
      " |      \n",
      " |      >>> (3 + 2*x + 4*x**2).coeff(x, 0)\n",
      " |      3\n",
      " |      >>> eq = ((x + 1)**3).expand() + 1\n",
      " |      >>> eq\n",
      " |      x**3 + 3*x**2 + 3*x + 2\n",
      " |      >>> [eq.coeff(x, i) for i in reversed(range(4))]\n",
      " |      [1, 3, 3, 2]\n",
      " |      >>> eq -= 2\n",
      " |      >>> [eq.coeff(x, i) for i in reversed(range(4))]\n",
      " |      [1, 3, 3, 0]\n",
      " |      \n",
      " |      You can select terms that have a numerical term in front of them:\n",
      " |      \n",
      " |      >>> (-x - 2*y).coeff(2)\n",
      " |      -y\n",
      " |      >>> from sympy import sqrt\n",
      " |      >>> (x + sqrt(2)*x).coeff(sqrt(2))\n",
      " |      x\n",
      " |      \n",
      " |      The matching is exact:\n",
      " |      \n",
      " |      >>> (3 + 2*x + 4*x**2).coeff(x)\n",
      " |      2\n",
      " |      >>> (3 + 2*x + 4*x**2).coeff(x**2)\n",
      " |      4\n",
      " |      >>> (3 + 2*x + 4*x**2).coeff(x**3)\n",
      " |      0\n",
      " |      >>> (z*(x + y)**2).coeff((x + y)**2)\n",
      " |      z\n",
      " |      >>> (z*(x + y)**2).coeff(x + y)\n",
      " |      0\n",
      " |      \n",
      " |      In addition, no factoring is done, so 1 + z*(1 + y) is not obtained\n",
      " |      from the following:\n",
      " |      \n",
      " |      >>> (x + z*(x + x*y)).coeff(x)\n",
      " |      1\n",
      " |      \n",
      " |      If such factoring is desired, factor_terms can be used first:\n",
      " |      \n",
      " |      >>> from sympy import factor_terms\n",
      " |      >>> factor_terms(x + z*(x + x*y)).coeff(x)\n",
      " |      z*(y + 1) + 1\n",
      " |      \n",
      " |      >>> n, m, o = symbols('n m o', commutative=False)\n",
      " |      >>> n.coeff(n)\n",
      " |      1\n",
      " |      >>> (3*n).coeff(n)\n",
      " |      3\n",
      " |      >>> (n*m + m*n*m).coeff(n) # = (1 + m)*n*m\n",
      " |      1 + m\n",
      " |      >>> (n*m + m*n*m).coeff(n, right=True) # = (1 + m)*n*m\n",
      " |      m\n",
      " |      \n",
      " |      If there is more than one possible coefficient 0 is returned:\n",
      " |      \n",
      " |      >>> (n*m + m*n).coeff(n)\n",
      " |      0\n",
      " |      \n",
      " |      If there is only one possible coefficient, it is returned:\n",
      " |      \n",
      " |      >>> (n*m + x*m*n).coeff(m*n)\n",
      " |      x\n",
      " |      >>> (n*m + x*m*n).coeff(m*n, right=1)\n",
      " |      1\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      as_coefficient: separate the expression into a coefficient and factor\n",
      " |      as_coeff_Add: separate the additive constant from an expression\n",
      " |      as_coeff_Mul: separate the multiplicative constant from an expression\n",
      " |      as_independent: separate x-dependent terms/factors from others\n",
      " |      sympy.polys.polytools.Poly.coeff_monomial: efficiently find the single coefficient of a monomial in Poly\n",
      " |      sympy.polys.polytools.Poly.nth: like coeff_monomial but powers of monomial terms are used\n",
      " |  \n",
      " |  collect(self, syms, func=None, evaluate=True, exact=False, distribute_order_term=True)\n",
      " |      See the collect function in sympy.simplify\n",
      " |  \n",
      " |  combsimp(self)\n",
      " |      See the combsimp function in sympy.simplify\n",
      " |  \n",
      " |  compute_leading_term(self, x, logx=None)\n",
      " |      Deprecated function to compute the leading term of a series.\n",
      " |      \n",
      " |      as_leading_term is only allowed for results of .series()\n",
      " |      This is a wrapper to compute a series first.\n",
      " |  \n",
      " |  conjugate(self)\n",
      " |      Returns the complex conjugate of 'self'.\n",
      " |  \n",
      " |  could_extract_minus_sign(self)\n",
      " |      Return True if self has -1 as a leading factor or has\n",
      " |      more literal negative signs than positive signs in a sum,\n",
      " |      otherwise False.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy.abc import x, y\n",
      " |      >>> e = x - y\n",
      " |      >>> {i.could_extract_minus_sign() for i in (e, -e)}\n",
      " |      {False, True}\n",
      " |      \n",
      " |      Though the ``y - x`` is considered like ``-(x - y)``, since it\n",
      " |      is in a product without a leading factor of -1, the result is\n",
      " |      false below:\n",
      " |      \n",
      " |      >>> (x*(y - x)).could_extract_minus_sign()\n",
      " |      False\n",
      " |      \n",
      " |      To put something in canonical form wrt to sign, use `signsimp`:\n",
      " |      \n",
      " |      >>> from sympy import signsimp\n",
      " |      >>> signsimp(x*(y - x))\n",
      " |      -x*(x - y)\n",
      " |      >>> _.could_extract_minus_sign()\n",
      " |      True\n",
      " |  \n",
      " |  count_ops(self, visual=None)\n",
      " |      Wrapper for count_ops that returns the operation count.\n",
      " |  \n",
      " |  diff(self, *symbols, **assumptions)\n",
      " |  \n",
      " |  dir(self, x, cdir)\n",
      " |  \n",
      " |  equals(self, other, failing_expression=False)\n",
      " |      Return True if self == other, False if it does not, or None. If\n",
      " |      failing_expression is True then the expression which did not simplify\n",
      " |      to a 0 will be returned instead of None.\n",
      " |      \n",
      " |      Explanation\n",
      " |      ===========\n",
      " |      \n",
      " |      If ``self`` is a Number (or complex number) that is not zero, then\n",
      " |      the result is False.\n",
      " |      \n",
      " |      If ``self`` is a number and has not evaluated to zero, evalf will be\n",
      " |      used to test whether the expression evaluates to zero. If it does so\n",
      " |      and the result has significance (i.e. the precision is either -1, for\n",
      " |      a Rational result, or is greater than 1) then the evalf value will be\n",
      " |      used to return True or False.\n",
      " |  \n",
      " |  expand(self, deep=True, modulus=None, power_base=True, power_exp=True, mul=True, log=True, multinomial=True, basic=True, **hints)\n",
      " |      Expand an expression using hints.\n",
      " |      \n",
      " |      See the docstring of the expand() function in sympy.core.function for\n",
      " |      more information.\n",
      " |  \n",
      " |  extract_additively(self, c)\n",
      " |      Return self - c if it's possible to subtract c from self and\n",
      " |      make all matching coefficients move towards zero, else return None.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy.abc import x, y\n",
      " |      >>> e = 2*x + 3\n",
      " |      >>> e.extract_additively(x + 1)\n",
      " |      x + 2\n",
      " |      >>> e.extract_additively(3*x)\n",
      " |      >>> e.extract_additively(4)\n",
      " |      >>> (y*(x + 1)).extract_additively(x + 1)\n",
      " |      >>> ((x + 1)*(x + 2*y + 1) + 3).extract_additively(x + 1)\n",
      " |      (x + 1)*(x + 2*y) + 3\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      extract_multiplicatively\n",
      " |      coeff\n",
      " |      as_coefficient\n",
      " |  \n",
      " |  extract_branch_factor(self, allow_half=False)\n",
      " |      Try to write self as ``exp_polar(2*pi*I*n)*z`` in a nice way.\n",
      " |      Return (z, n).\n",
      " |      \n",
      " |      >>> from sympy import exp_polar, I, pi\n",
      " |      >>> from sympy.abc import x, y\n",
      " |      >>> exp_polar(I*pi).extract_branch_factor()\n",
      " |      (exp_polar(I*pi), 0)\n",
      " |      >>> exp_polar(2*I*pi).extract_branch_factor()\n",
      " |      (1, 1)\n",
      " |      >>> exp_polar(-pi*I).extract_branch_factor()\n",
      " |      (exp_polar(I*pi), -1)\n",
      " |      >>> exp_polar(3*pi*I + x).extract_branch_factor()\n",
      " |      (exp_polar(x + I*pi), 1)\n",
      " |      >>> (y*exp_polar(-5*pi*I)*exp_polar(3*pi*I + 2*pi*x)).extract_branch_factor()\n",
      " |      (y*exp_polar(2*pi*x), -1)\n",
      " |      >>> exp_polar(-I*pi/2).extract_branch_factor()\n",
      " |      (exp_polar(-I*pi/2), 0)\n",
      " |      \n",
      " |      If allow_half is True, also extract exp_polar(I*pi):\n",
      " |      \n",
      " |      >>> exp_polar(I*pi).extract_branch_factor(allow_half=True)\n",
      " |      (1, 1/2)\n",
      " |      >>> exp_polar(2*I*pi).extract_branch_factor(allow_half=True)\n",
      " |      (1, 1)\n",
      " |      >>> exp_polar(3*I*pi).extract_branch_factor(allow_half=True)\n",
      " |      (1, 3/2)\n",
      " |      >>> exp_polar(-I*pi).extract_branch_factor(allow_half=True)\n",
      " |      (1, -1/2)\n",
      " |  \n",
      " |  extract_multiplicatively(self, c)\n",
      " |      Return None if it's not possible to make self in the form\n",
      " |      c * something in a nice way, i.e. preserving the properties\n",
      " |      of arguments of self.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import symbols, Rational\n",
      " |      \n",
      " |      >>> x, y = symbols('x,y', real=True)\n",
      " |      \n",
      " |      >>> ((x*y)**3).extract_multiplicatively(x**2 * y)\n",
      " |      x*y**2\n",
      " |      \n",
      " |      >>> ((x*y)**3).extract_multiplicatively(x**4 * y)\n",
      " |      \n",
      " |      >>> (2*x).extract_multiplicatively(2)\n",
      " |      x\n",
      " |      \n",
      " |      >>> (2*x).extract_multiplicatively(3)\n",
      " |      \n",
      " |      >>> (Rational(1, 2)*x).extract_multiplicatively(3)\n",
      " |      x/6\n",
      " |  \n",
      " |  factor(self, *gens, **args)\n",
      " |      See the factor() function in sympy.polys.polytools\n",
      " |  \n",
      " |  fourier_series(self, limits=None)\n",
      " |      Compute fourier sine/cosine series of self.\n",
      " |      \n",
      " |      See the docstring of the :func:`fourier_series` in sympy.series.fourier\n",
      " |      for more information.\n",
      " |  \n",
      " |  fps(self, x=None, x0=0, dir=1, hyper=True, order=4, rational=True, full=False)\n",
      " |      Compute formal power power series of self.\n",
      " |      \n",
      " |      See the docstring of the :func:`fps` function in sympy.series.formal for\n",
      " |      more information.\n",
      " |  \n",
      " |  gammasimp(self)\n",
      " |      See the gammasimp function in sympy.simplify\n",
      " |  \n",
      " |  getO(self)\n",
      " |      Returns the additive O(..) symbol if there is one, else None.\n",
      " |  \n",
      " |  getn(self)\n",
      " |      Returns the order of the expression.\n",
      " |      \n",
      " |      Explanation\n",
      " |      ===========\n",
      " |      \n",
      " |      The order is determined either from the O(...) term. If there\n",
      " |      is no O(...) term, it returns None.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import O\n",
      " |      >>> from sympy.abc import x\n",
      " |      >>> (1 + x + O(x**2)).getn()\n",
      " |      2\n",
      " |      >>> (1 + x).getn()\n",
      " |  \n",
      " |  integrate(self, *args, **kwargs)\n",
      " |      See the integrate function in sympy.integrals\n",
      " |  \n",
      " |  invert(self, g, *gens, **args)\n",
      " |      Return the multiplicative inverse of ``self`` mod ``g``\n",
      " |      where ``self`` (and ``g``) may be symbolic expressions).\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      sympy.core.numbers.mod_inverse, sympy.polys.polytools.invert\n",
      " |  \n",
      " |  is_algebraic_expr(self, *syms)\n",
      " |      This tests whether a given expression is algebraic or not, in the\n",
      " |      given symbols, syms. When syms is not given, all free symbols\n",
      " |      will be used. The rational function does not have to be in expanded\n",
      " |      or in any kind of canonical form.\n",
      " |      \n",
      " |      This function returns False for expressions that are \"algebraic\n",
      " |      expressions\" with symbolic exponents. This is a simple extension to the\n",
      " |      is_rational_function, including rational exponentiation.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Symbol, sqrt\n",
      " |      >>> x = Symbol('x', real=True)\n",
      " |      >>> sqrt(1 + x).is_rational_function()\n",
      " |      False\n",
      " |      >>> sqrt(1 + x).is_algebraic_expr()\n",
      " |      True\n",
      " |      \n",
      " |      This function does not attempt any nontrivial simplifications that may\n",
      " |      result in an expression that does not appear to be an algebraic\n",
      " |      expression to become one.\n",
      " |      \n",
      " |      >>> from sympy import exp, factor\n",
      " |      >>> a = sqrt(exp(x)**2 + 2*exp(x) + 1)/(exp(x) + 1)\n",
      " |      >>> a.is_algebraic_expr(x)\n",
      " |      False\n",
      " |      >>> factor(a).is_algebraic_expr()\n",
      " |      True\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      is_rational_function\n",
      " |      \n",
      " |      References\n",
      " |      ==========\n",
      " |      \n",
      " |      .. [1] https://en.wikipedia.org/wiki/Algebraic_expression\n",
      " |  \n",
      " |  is_constant(self, *wrt, **flags)\n",
      " |      Return True if self is constant, False if not, or None if\n",
      " |      the constancy could not be determined conclusively.\n",
      " |      \n",
      " |      Explanation\n",
      " |      ===========\n",
      " |      \n",
      " |      If an expression has no free symbols then it is a constant. If\n",
      " |      there are free symbols it is possible that the expression is a\n",
      " |      constant, perhaps (but not necessarily) zero. To test such\n",
      " |      expressions, a few strategies are tried:\n",
      " |      \n",
      " |      1) numerical evaluation at two random points. If two such evaluations\n",
      " |      give two different values and the values have a precision greater than\n",
      " |      1 then self is not constant. If the evaluations agree or could not be\n",
      " |      obtained with any precision, no decision is made. The numerical testing\n",
      " |      is done only if ``wrt`` is different than the free symbols.\n",
      " |      \n",
      " |      2) differentiation with respect to variables in 'wrt' (or all free\n",
      " |      symbols if omitted) to see if the expression is constant or not. This\n",
      " |      will not always lead to an expression that is zero even though an\n",
      " |      expression is constant (see added test in test_expr.py). If\n",
      " |      all derivatives are zero then self is constant with respect to the\n",
      " |      given symbols.\n",
      " |      \n",
      " |      3) finding out zeros of denominator expression with free_symbols.\n",
      " |      It will not be constant if there are zeros. It gives more negative\n",
      " |      answers for expression that are not constant.\n",
      " |      \n",
      " |      If neither evaluation nor differentiation can prove the expression is\n",
      " |      constant, None is returned unless two numerical values happened to be\n",
      " |      the same and the flag ``failing_number`` is True -- in that case the\n",
      " |      numerical value will be returned.\n",
      " |      \n",
      " |      If flag simplify=False is passed, self will not be simplified;\n",
      " |      the default is True since self should be simplified before testing.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import cos, sin, Sum, S, pi\n",
      " |      >>> from sympy.abc import a, n, x, y\n",
      " |      >>> x.is_constant()\n",
      " |      False\n",
      " |      >>> S(2).is_constant()\n",
      " |      True\n",
      " |      >>> Sum(x, (x, 1, 10)).is_constant()\n",
      " |      True\n",
      " |      >>> Sum(x, (x, 1, n)).is_constant()\n",
      " |      False\n",
      " |      >>> Sum(x, (x, 1, n)).is_constant(y)\n",
      " |      True\n",
      " |      >>> Sum(x, (x, 1, n)).is_constant(n)\n",
      " |      False\n",
      " |      >>> Sum(x, (x, 1, n)).is_constant(x)\n",
      " |      True\n",
      " |      >>> eq = a*cos(x)**2 + a*sin(x)**2 - a\n",
      " |      >>> eq.is_constant()\n",
      " |      True\n",
      " |      >>> eq.subs({x: pi, a: 2}) == eq.subs({x: pi, a: 3}) == 0\n",
      " |      True\n",
      " |      \n",
      " |      >>> (0**x).is_constant()\n",
      " |      False\n",
      " |      >>> x.is_constant()\n",
      " |      False\n",
      " |      >>> (x**x).is_constant()\n",
      " |      False\n",
      " |      >>> one = cos(x)**2 + sin(x)**2\n",
      " |      >>> one.is_constant()\n",
      " |      True\n",
      " |      >>> ((one - 1)**(x + 1)).is_constant() in (True, False) # could be 0 or 1\n",
      " |      True\n",
      " |  \n",
      " |  is_meromorphic(self, x, a)\n",
      " |      This tests whether an expression is meromorphic as\n",
      " |      a function of the given symbol ``x`` at the point ``a``.\n",
      " |      \n",
      " |      This method is intended as a quick test that will return\n",
      " |      None if no decision can be made without simplification or\n",
      " |      more detailed analysis.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import zoo, log, sin, sqrt\n",
      " |      >>> from sympy.abc import x\n",
      " |      \n",
      " |      >>> f = 1/x**2 + 1 - 2*x**3\n",
      " |      >>> f.is_meromorphic(x, 0)\n",
      " |      True\n",
      " |      >>> f.is_meromorphic(x, 1)\n",
      " |      True\n",
      " |      >>> f.is_meromorphic(x, zoo)\n",
      " |      True\n",
      " |      \n",
      " |      >>> g = x**log(3)\n",
      " |      >>> g.is_meromorphic(x, 0)\n",
      " |      False\n",
      " |      >>> g.is_meromorphic(x, 1)\n",
      " |      True\n",
      " |      >>> g.is_meromorphic(x, zoo)\n",
      " |      False\n",
      " |      \n",
      " |      >>> h = sin(1/x)*x**2\n",
      " |      >>> h.is_meromorphic(x, 0)\n",
      " |      False\n",
      " |      >>> h.is_meromorphic(x, 1)\n",
      " |      True\n",
      " |      >>> h.is_meromorphic(x, zoo)\n",
      " |      True\n",
      " |      \n",
      " |      Multivalued functions are considered meromorphic when their\n",
      " |      branches are meromorphic. Thus most functions are meromorphic\n",
      " |      everywhere except at essential singularities and branch points.\n",
      " |      In particular, they will be meromorphic also on branch cuts\n",
      " |      except at their endpoints.\n",
      " |      \n",
      " |      >>> log(x).is_meromorphic(x, -1)\n",
      " |      True\n",
      " |      >>> log(x).is_meromorphic(x, 0)\n",
      " |      False\n",
      " |      >>> sqrt(x).is_meromorphic(x, -1)\n",
      " |      True\n",
      " |      >>> sqrt(x).is_meromorphic(x, 0)\n",
      " |      False\n",
      " |  \n",
      " |  is_polynomial(self, *syms)\n",
      " |      Return True if self is a polynomial in syms and False otherwise.\n",
      " |      \n",
      " |      This checks if self is an exact polynomial in syms.  This function\n",
      " |      returns False for expressions that are \"polynomials\" with symbolic\n",
      " |      exponents.  Thus, you should be able to apply polynomial algorithms to\n",
      " |      expressions for which this returns True, and Poly(expr, \\*syms) should\n",
      " |      work if and only if expr.is_polynomial(\\*syms) returns True. The\n",
      " |      polynomial does not have to be in expanded form.  If no symbols are\n",
      " |      given, all free symbols in the expression will be used.\n",
      " |      \n",
      " |      This is not part of the assumptions system.  You cannot do\n",
      " |      Symbol('z', polynomial=True).\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Symbol, Function\n",
      " |      >>> x = Symbol('x')\n",
      " |      >>> ((x**2 + 1)**4).is_polynomial(x)\n",
      " |      True\n",
      " |      >>> ((x**2 + 1)**4).is_polynomial()\n",
      " |      True\n",
      " |      >>> (2**x + 1).is_polynomial(x)\n",
      " |      False\n",
      " |      >>> (2**x + 1).is_polynomial(2**x)\n",
      " |      True\n",
      " |      >>> f = Function('f')\n",
      " |      >>> (f(x) + 1).is_polynomial(x)\n",
      " |      False\n",
      " |      >>> (f(x) + 1).is_polynomial(f(x))\n",
      " |      True\n",
      " |      >>> (1/f(x) + 1).is_polynomial(f(x))\n",
      " |      False\n",
      " |      \n",
      " |      >>> n = Symbol('n', nonnegative=True, integer=True)\n",
      " |      >>> (x**n + 1).is_polynomial(x)\n",
      " |      False\n",
      " |      \n",
      " |      This function does not attempt any nontrivial simplifications that may\n",
      " |      result in an expression that does not appear to be a polynomial to\n",
      " |      become one.\n",
      " |      \n",
      " |      >>> from sympy import sqrt, factor, cancel\n",
      " |      >>> y = Symbol('y', positive=True)\n",
      " |      >>> a = sqrt(y**2 + 2*y + 1)\n",
      " |      >>> a.is_polynomial(y)\n",
      " |      False\n",
      " |      >>> factor(a)\n",
      " |      y + 1\n",
      " |      >>> factor(a).is_polynomial(y)\n",
      " |      True\n",
      " |      \n",
      " |      >>> b = (y**2 + 2*y + 1)/(y + 1)\n",
      " |      >>> b.is_polynomial(y)\n",
      " |      False\n",
      " |      >>> cancel(b)\n",
      " |      y + 1\n",
      " |      >>> cancel(b).is_polynomial(y)\n",
      " |      True\n",
      " |      \n",
      " |      See also .is_rational_function()\n",
      " |  \n",
      " |  is_rational_function(self, *syms)\n",
      " |      Test whether function is a ratio of two polynomials in the given\n",
      " |      symbols, syms. When syms is not given, all free symbols will be used.\n",
      " |      The rational function does not have to be in expanded or in any kind of\n",
      " |      canonical form.\n",
      " |      \n",
      " |      This function returns False for expressions that are \"rational\n",
      " |      functions\" with symbolic exponents.  Thus, you should be able to call\n",
      " |      .as_numer_denom() and apply polynomial algorithms to the result for\n",
      " |      expressions for which this returns True.\n",
      " |      \n",
      " |      This is not part of the assumptions system.  You cannot do\n",
      " |      Symbol('z', rational_function=True).\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Symbol, sin\n",
      " |      >>> from sympy.abc import x, y\n",
      " |      \n",
      " |      >>> (x/y).is_rational_function()\n",
      " |      True\n",
      " |      \n",
      " |      >>> (x**2).is_rational_function()\n",
      " |      True\n",
      " |      \n",
      " |      >>> (x/sin(y)).is_rational_function(y)\n",
      " |      False\n",
      " |      \n",
      " |      >>> n = Symbol('n', integer=True)\n",
      " |      >>> (x**n + 1).is_rational_function(x)\n",
      " |      False\n",
      " |      \n",
      " |      This function does not attempt any nontrivial simplifications that may\n",
      " |      result in an expression that does not appear to be a rational function\n",
      " |      to become one.\n",
      " |      \n",
      " |      >>> from sympy import sqrt, factor\n",
      " |      >>> y = Symbol('y', positive=True)\n",
      " |      >>> a = sqrt(y**2 + 2*y + 1)/y\n",
      " |      >>> a.is_rational_function(y)\n",
      " |      False\n",
      " |      >>> factor(a)\n",
      " |      (y + 1)/y\n",
      " |      >>> factor(a).is_rational_function(y)\n",
      " |      True\n",
      " |      \n",
      " |      See also is_algebraic_expr().\n",
      " |  \n",
      " |  leadterm(self, x, logx=None, cdir=0)\n",
      " |      Returns the leading term a*x**b as a tuple (a, b).\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy.abc import x\n",
      " |      >>> (1+x+x**2).leadterm(x)\n",
      " |      (1, 0)\n",
      " |      >>> (1/x**2+x+x**2).leadterm(x)\n",
      " |      (1, -2)\n",
      " |  \n",
      " |  limit(self, x, xlim, dir='+')\n",
      " |      Compute limit x->xlim.\n",
      " |  \n",
      " |  lseries(self, x=None, x0=0, dir='+', logx=None, cdir=0)\n",
      " |      Wrapper for series yielding an iterator of the terms of the series.\n",
      " |      \n",
      " |      Note: an infinite series will yield an infinite iterator. The following,\n",
      " |      for exaxmple, will never terminate. It will just keep printing terms\n",
      " |      of the sin(x) series::\n",
      " |      \n",
      " |        for term in sin(x).lseries(x):\n",
      " |            print term\n",
      " |      \n",
      " |      The advantage of lseries() over nseries() is that many times you are\n",
      " |      just interested in the next term in the series (i.e. the first term for\n",
      " |      example), but you do not know how many you should ask for in nseries()\n",
      " |      using the \"n\" parameter.\n",
      " |      \n",
      " |      See also nseries().\n",
      " |  \n",
      " |  normal(self)\n",
      " |      Return the expression as a fraction.\n",
      " |      \n",
      " |      expression -> a/b\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      as_numer_denom: return ``(a, b)`` instead of ``a/b``\n",
      " |  \n",
      " |  nseries(self, x=None, x0=0, n=6, dir='+', logx=None, cdir=0)\n",
      " |      Wrapper to _eval_nseries if assumptions allow, else to series.\n",
      " |      \n",
      " |      If x is given, x0 is 0, dir='+', and self has x, then _eval_nseries is\n",
      " |      called. This calculates \"n\" terms in the innermost expressions and\n",
      " |      then builds up the final series just by \"cross-multiplying\" everything\n",
      " |      out.\n",
      " |      \n",
      " |      The optional ``logx`` parameter can be used to replace any log(x) in the\n",
      " |      returned series with a symbolic value to avoid evaluating log(x) at 0. A\n",
      " |      symbol to use in place of log(x) should be provided.\n",
      " |      \n",
      " |      Advantage -- it's fast, because we do not have to determine how many\n",
      " |      terms we need to calculate in advance.\n",
      " |      \n",
      " |      Disadvantage -- you may end up with less terms than you may have\n",
      " |      expected, but the O(x**n) term appended will always be correct and\n",
      " |      so the result, though perhaps shorter, will also be correct.\n",
      " |      \n",
      " |      If any of those assumptions is not met, this is treated like a\n",
      " |      wrapper to series which will try harder to return the correct\n",
      " |      number of terms.\n",
      " |      \n",
      " |      See also lseries().\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import sin, log, Symbol\n",
      " |      >>> from sympy.abc import x, y\n",
      " |      >>> sin(x).nseries(x, 0, 6)\n",
      " |      x - x**3/6 + x**5/120 + O(x**6)\n",
      " |      >>> log(x+1).nseries(x, 0, 5)\n",
      " |      x - x**2/2 + x**3/3 - x**4/4 + O(x**5)\n",
      " |      \n",
      " |      Handling of the ``logx`` parameter --- in the following example the\n",
      " |      expansion fails since ``sin`` does not have an asymptotic expansion\n",
      " |      at -oo (the limit of log(x) as x approaches 0):\n",
      " |      \n",
      " |      >>> e = sin(log(x))\n",
      " |      >>> e.nseries(x, 0, 6)\n",
      " |      Traceback (most recent call last):\n",
      " |      ...\n",
      " |      PoleError: ...\n",
      " |      ...\n",
      " |      >>> logx = Symbol('logx')\n",
      " |      >>> e.nseries(x, 0, 6, logx=logx)\n",
      " |      sin(logx)\n",
      " |      \n",
      " |      In the following example, the expansion works but only returns self\n",
      " |      unless the ``logx`` parameter is used:\n",
      " |      \n",
      " |      >>> e = x**y\n",
      " |      >>> e.nseries(x, 0, 2)\n",
      " |      x**y\n",
      " |      >>> e.nseries(x, 0, 2, logx=logx)\n",
      " |      exp(logx*y)\n",
      " |  \n",
      " |  nsimplify(self, constants=(), tolerance=None, full=False)\n",
      " |      See the nsimplify function in sympy.simplify\n",
      " |  \n",
      " |  powsimp(self, *args, **kwargs)\n",
      " |      See the powsimp function in sympy.simplify\n",
      " |  \n",
      " |  primitive(self)\n",
      " |      Return the positive Rational that can be extracted non-recursively\n",
      " |      from every term of self (i.e., self is treated like an Add). This is\n",
      " |      like the as_coeff_Mul() method but primitive always extracts a positive\n",
      " |      Rational (never a negative or a Float).\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy.abc import x\n",
      " |      >>> (3*(x + 1)**2).primitive()\n",
      " |      (3, (x + 1)**2)\n",
      " |      >>> a = (6*x + 2); a.primitive()\n",
      " |      (2, 3*x + 1)\n",
      " |      >>> b = (x/2 + 3); b.primitive()\n",
      " |      (1/2, x + 6)\n",
      " |      >>> (a*b).primitive() == (1, a*b)\n",
      " |      True\n",
      " |  \n",
      " |  radsimp(self, **kwargs)\n",
      " |      See the radsimp function in sympy.simplify\n",
      " |  \n",
      " |  ratsimp(self)\n",
      " |      See the ratsimp function in sympy.simplify\n",
      " |  \n",
      " |  removeO(self)\n",
      " |      Removes the additive O(..) symbol if there is one\n",
      " |  \n",
      " |  round(self, n=None)\n",
      " |      Return x rounded to the given decimal place.\n",
      " |      \n",
      " |      If a complex number would results, apply round to the real\n",
      " |      and imaginary components of the number.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import pi, E, I, S, Number\n",
      " |      >>> pi.round()\n",
      " |      3\n",
      " |      >>> pi.round(2)\n",
      " |      3.14\n",
      " |      >>> (2*pi + E*I).round()\n",
      " |      6 + 3*I\n",
      " |      \n",
      " |      The round method has a chopping effect:\n",
      " |      \n",
      " |      >>> (2*pi + I/10).round()\n",
      " |      6\n",
      " |      >>> (pi/10 + 2*I).round()\n",
      " |      2*I\n",
      " |      >>> (pi/10 + E*I).round(2)\n",
      " |      0.31 + 2.72*I\n",
      " |      \n",
      " |      Notes\n",
      " |      =====\n",
      " |      \n",
      " |      The Python ``round`` function uses the SymPy ``round`` method so it\n",
      " |      will always return a SymPy number (not a Python float or int):\n",
      " |      \n",
      " |      >>> isinstance(round(S(123), -2), Number)\n",
      " |      True\n",
      " |  \n",
      " |  separate(self, deep=False, force=False)\n",
      " |      See the separate function in sympy.simplify\n",
      " |  \n",
      " |  series(self, x=None, x0=0, n=6, dir='+', logx=None, cdir=0)\n",
      " |      Series expansion of \"self\" around ``x = x0`` yielding either terms of\n",
      " |      the series one by one (the lazy series given when n=None), else\n",
      " |      all the terms at once when n != None.\n",
      " |      \n",
      " |      Returns the series expansion of \"self\" around the point ``x = x0``\n",
      " |      with respect to ``x`` up to ``O((x - x0)**n, x, x0)`` (default n is 6).\n",
      " |      \n",
      " |      If ``x=None`` and ``self`` is univariate, the univariate symbol will\n",
      " |      be supplied, otherwise an error will be raised.\n",
      " |      \n",
      " |      Parameters\n",
      " |      ==========\n",
      " |      \n",
      " |      expr : Expression\n",
      " |             The expression whose series is to be expanded.\n",
      " |      \n",
      " |      x : Symbol\n",
      " |          It is the variable of the expression to be calculated.\n",
      " |      \n",
      " |      x0 : Value\n",
      " |           The value around which ``x`` is calculated. Can be any value\n",
      " |           from ``-oo`` to ``oo``.\n",
      " |      \n",
      " |      n : Value\n",
      " |          The value used to represent the order in terms of ``x**n``,\n",
      " |          up to which the series is to be expanded.\n",
      " |      \n",
      " |      dir : String, optional\n",
      " |            The series-expansion can be bi-directional. If ``dir=\"+\"``,\n",
      " |            then (x->x0+). If ``dir=\"-\", then (x->x0-). For infinite\n",
      " |            ``x0`` (``oo`` or ``-oo``), the ``dir`` argument is determined\n",
      " |            from the direction of the infinity (i.e., ``dir=\"-\"`` for\n",
      " |            ``oo``).\n",
      " |      \n",
      " |      logx : optional\n",
      " |             It is used to replace any log(x) in the returned series with a\n",
      " |             symbolic value rather than evaluating the actual value.\n",
      " |      \n",
      " |      cdir : optional\n",
      " |             It stands for complex direction, and indicates the direction\n",
      " |             from which the expansion needs to be evaluated.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import cos, exp, tan\n",
      " |      >>> from sympy.abc import x, y\n",
      " |      >>> cos(x).series()\n",
      " |      1 - x**2/2 + x**4/24 + O(x**6)\n",
      " |      >>> cos(x).series(n=4)\n",
      " |      1 - x**2/2 + O(x**4)\n",
      " |      >>> cos(x).series(x, x0=1, n=2)\n",
      " |      cos(1) - (x - 1)*sin(1) + O((x - 1)**2, (x, 1))\n",
      " |      >>> e = cos(x + exp(y))\n",
      " |      >>> e.series(y, n=2)\n",
      " |      cos(x + 1) - y*sin(x + 1) + O(y**2)\n",
      " |      >>> e.series(x, n=2)\n",
      " |      cos(exp(y)) - x*sin(exp(y)) + O(x**2)\n",
      " |      \n",
      " |      If ``n=None`` then a generator of the series terms will be returned.\n",
      " |      \n",
      " |      >>> term=cos(x).series(n=None)\n",
      " |      >>> [next(term) for i in range(2)]\n",
      " |      [1, -x**2/2]\n",
      " |      \n",
      " |      For ``dir=+`` (default) the series is calculated from the right and\n",
      " |      for ``dir=-`` the series from the left. For smooth functions this\n",
      " |      flag will not alter the results.\n",
      " |      \n",
      " |      >>> abs(x).series(dir=\"+\")\n",
      " |      x\n",
      " |      >>> abs(x).series(dir=\"-\")\n",
      " |      -x\n",
      " |      >>> f = tan(x)\n",
      " |      >>> f.series(x, 2, 6, \"+\")\n",
      " |      tan(2) + (1 + tan(2)**2)*(x - 2) + (x - 2)**2*(tan(2)**3 + tan(2)) +\n",
      " |      (x - 2)**3*(1/3 + 4*tan(2)**2/3 + tan(2)**4) + (x - 2)**4*(tan(2)**5 +\n",
      " |      5*tan(2)**3/3 + 2*tan(2)/3) + (x - 2)**5*(2/15 + 17*tan(2)**2/15 +\n",
      " |      2*tan(2)**4 + tan(2)**6) + O((x - 2)**6, (x, 2))\n",
      " |      \n",
      " |      >>> f.series(x, 2, 3, \"-\")\n",
      " |      tan(2) + (2 - x)*(-tan(2)**2 - 1) + (2 - x)**2*(tan(2)**3 + tan(2))\n",
      " |      + O((x - 2)**3, (x, 2))\n",
      " |      \n",
      " |      For rational expressions this method may return original expression without the Order term.\n",
      " |      >>> (1/x).series(x, n=8)\n",
      " |      1/x\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      Expr : Expression\n",
      " |          Series expansion of the expression about x0\n",
      " |      \n",
      " |      Raises\n",
      " |      ======\n",
      " |      \n",
      " |      TypeError\n",
      " |          If \"n\" and \"x0\" are infinity objects\n",
      " |      \n",
      " |      PoleError\n",
      " |          If \"x0\" is an infinity object\n",
      " |  \n",
      " |  sort_key(self, order=None)\n",
      " |      Return a sort key.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import S, I\n",
      " |      \n",
      " |      >>> sorted([S(1)/2, I, -I], key=lambda x: x.sort_key())\n",
      " |      [1/2, -I, I]\n",
      " |      \n",
      " |      >>> S(\"[x, 1/x, 1/x**2, x**2, x**(1/2), x**(1/4), x**(3/2)]\")\n",
      " |      [x, 1/x, x**(-2), x**2, sqrt(x), x**(1/4), x**(3/2)]\n",
      " |      >>> sorted(_, key=lambda x: x.sort_key())\n",
      " |      [x**(-2), 1/x, x**(1/4), sqrt(x), x, x**(3/2), x**2]\n",
      " |  \n",
      " |  taylor_term(self, n, x, *previous_terms)\n",
      " |      General method for the taylor term.\n",
      " |      \n",
      " |      This method is slow, because it differentiates n-times. Subclasses can\n",
      " |      redefine it to make it faster by using the \"previous_terms\".\n",
      " |  \n",
      " |  together(self, *args, **kwargs)\n",
      " |      See the together function in sympy.polys\n",
      " |  \n",
      " |  transpose(self)\n",
      " |  \n",
      " |  trigsimp(self, **args)\n",
      " |      See the trigsimp function in sympy.simplify\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Readonly properties inherited from sympy.core.expr.Expr:\n",
      " |  \n",
      " |  expr_free_symbols\n",
      " |      Like ``free_symbols``, but returns the free symbols only if\n",
      " |      they are contained in an expression node.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy.abc import x, y\n",
      " |      >>> (x + y).expr_free_symbols # doctest: +SKIP\n",
      " |      {x, y}\n",
      " |      \n",
      " |      If the expression is contained in a non-expression object, do not return\n",
      " |      the free symbols. Compare:\n",
      " |      \n",
      " |      >>> from sympy import Tuple\n",
      " |      >>> t = Tuple(x + y)\n",
      " |      >>> t.expr_free_symbols # doctest: +SKIP\n",
      " |      set()\n",
      " |      >>> t.free_symbols\n",
      " |      {x, y}\n",
      " |  \n",
      " |  is_number\n",
      " |      Returns True if ``self`` has no free symbols and no\n",
      " |      undefined functions (AppliedUndef, to be precise). It will be\n",
      " |      faster than ``if not self.free_symbols``, however, since\n",
      " |      ``is_number`` will fail as soon as it hits a free symbol\n",
      " |      or undefined function.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Function, Integral, cos, sin, pi\n",
      " |      >>> from sympy.abc import x\n",
      " |      >>> f = Function('f')\n",
      " |      \n",
      " |      >>> x.is_number\n",
      " |      False\n",
      " |      >>> f(1).is_number\n",
      " |      False\n",
      " |      >>> (2*x).is_number\n",
      " |      False\n",
      " |      >>> (2 + Integral(2, x)).is_number\n",
      " |      False\n",
      " |      >>> (2 + Integral(2, (x, 1, 2))).is_number\n",
      " |      True\n",
      " |      \n",
      " |      Not all numbers are Numbers in the SymPy sense:\n",
      " |      \n",
      " |      >>> pi.is_number, pi.is_Number\n",
      " |      (True, False)\n",
      " |      \n",
      " |      If something is a number it should evaluate to a number with\n",
      " |      real and imaginary parts that are Numbers; the result may not\n",
      " |      be comparable, however, since the real and/or imaginary part\n",
      " |      of the result may not have precision.\n",
      " |      \n",
      " |      >>> cos(1).is_number and cos(1).is_comparable\n",
      " |      True\n",
      " |      \n",
      " |      >>> z = cos(1)**2 + sin(1)**2 - 1\n",
      " |      >>> z.is_number\n",
      " |      True\n",
      " |      >>> z.is_comparable\n",
      " |      False\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      sympy.core.basic.Basic.is_comparable\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Data and other attributes inherited from sympy.core.expr.Expr:\n",
      " |  \n",
      " |  __annotations__ = {'__slots__': 'tuple[str, ...]'}\n",
      " |  \n",
      " |  is_scalar = True\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Class methods inherited from sympy.core.operations.LatticeOp:\n",
      " |  \n",
      " |  make_args(expr) from sympy.core.function.FunctionClass\n",
      " |      Return a set of args such that cls(*arg_set) == expr.\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Data descriptors inherited from sympy.core.operations.LatticeOp:\n",
      " |  \n",
      " |  __dict__\n",
      " |      dictionary for instance variables (if defined)\n",
      " |  \n",
      " |  __weakref__\n",
      " |      list of weak references to the object (if defined)\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Methods inherited from sympy.core.operations.AssocOp:\n",
      " |  \n",
      " |  doit(self, **hints)\n",
      " |      Evaluate objects that are not evaluated by default like limits,\n",
      " |      integrals, sums and products. All objects of this kind will be\n",
      " |      evaluated recursively, unless some species were excluded via 'hints'\n",
      " |      or unless the 'deep' hint was set to 'False'.\n",
      " |      \n",
      " |      >>> from sympy import Integral\n",
      " |      >>> from sympy.abc import x\n",
      " |      \n",
      " |      >>> 2*Integral(x, x)\n",
      " |      2*Integral(x, x)\n",
      " |      \n",
      " |      >>> (2*Integral(x, x)).doit()\n",
      " |      x**2\n",
      " |      \n",
      " |      >>> (2*Integral(x, x)).doit(deep=False)\n",
      " |      2*Integral(x, x)\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Class methods inherited from sympy.core.operations.AssocOp:\n",
      " |  \n",
      " |  flatten(seq) from sympy.core.function.FunctionClass\n",
      " |      Return seq so that none of the elements are of type `cls`. This is\n",
      " |      the vanilla routine that will be used if a class derived from AssocOp\n",
      " |      does not define its own flatten routine.\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Class methods inherited from sympy.core.function.Application:\n",
      " |  \n",
      " |  eval(*args) from sympy.core.function.FunctionClass\n",
      " |      Returns a canonical form of cls applied to arguments args.\n",
      " |      \n",
      " |      Explanation\n",
      " |      ===========\n",
      " |      \n",
      " |      The ``eval()`` method is called when the class ``cls`` is about to be\n",
      " |      instantiated and it should return either some simplified instance\n",
      " |      (possible of some other class), or if the class ``cls`` should be\n",
      " |      unmodified, return None.\n",
      " |      \n",
      " |      Examples of ``eval()`` for the function \"sign\"\n",
      " |      \n",
      " |      .. code-block:: python\n",
      " |      \n",
      " |          @classmethod\n",
      " |          def eval(cls, arg):\n",
      " |              if arg is S.NaN:\n",
      " |                  return S.NaN\n",
      " |              if arg.is_zero: return S.Zero\n",
      " |              if arg.is_positive: return S.One\n",
      " |              if arg.is_negative: return S.NegativeOne\n",
      " |              if isinstance(arg, Mul):\n",
      " |                  coeff, terms = arg.as_coeff_Mul(rational=True)\n",
      " |                  if coeff is not S.One:\n",
      " |                      return cls(coeff) * cls(terms)\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Readonly properties inherited from sympy.core.function.Application:\n",
      " |  \n",
      " |  func\n",
      " |      The top-level function in an expression.\n",
      " |      \n",
      " |      The following should hold for all objects::\n",
      " |      \n",
      " |          >> x == x.func(*x.args)\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy.abc import x\n",
      " |      >>> a = 2*x\n",
      " |      >>> a.func\n",
      " |      <class 'sympy.core.mul.Mul'>\n",
      " |      >>> a.args\n",
      " |      (2, x)\n",
      " |      >>> a.func(*a.args)\n",
      " |      2*x\n",
      " |      >>> a == a.func(*a.args)\n",
      " |      True\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Data and other attributes inherited from sympy.core.function.Application:\n",
      " |  \n",
      " |  is_Function = True\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Methods inherited from sympy.core.basic.Basic:\n",
      " |  \n",
      " |  __eq__(self, other)\n",
      " |      Return a boolean indicating whether a == b on the basis of\n",
      " |      their symbolic trees.\n",
      " |      \n",
      " |      This is the same as a.compare(b) == 0 but faster.\n",
      " |      \n",
      " |      Notes\n",
      " |      =====\n",
      " |      \n",
      " |      If a class that overrides __eq__() needs to retain the\n",
      " |      implementation of __hash__() from a parent class, the\n",
      " |      interpreter must be told this explicitly by setting\n",
      " |      __hash__ : Callable[[object], int] = <ParentClass>.__hash__.\n",
      " |      Otherwise the inheritance of __hash__() will be blocked,\n",
      " |      just as if __hash__ had been explicitly set to None.\n",
      " |      \n",
      " |      References\n",
      " |      ==========\n",
      " |      \n",
      " |      from https://docs.python.org/dev/reference/datamodel.html#object.__hash__\n",
      " |  \n",
      " |  __getnewargs__(self)\n",
      " |  \n",
      " |  __getstate__(self)\n",
      " |  \n",
      " |  __hash__(self) -> 'int'\n",
      " |      Return hash(self).\n",
      " |  \n",
      " |  __ne__(self, other)\n",
      " |      ``a != b``  -> Compare two symbolic trees and see whether they are different\n",
      " |      \n",
      " |      this is the same as:\n",
      " |      \n",
      " |      ``a.compare(b) != 0``\n",
      " |      \n",
      " |      but faster\n",
      " |  \n",
      " |  __reduce_ex__(self, protocol)\n",
      " |      Helper for pickle.\n",
      " |  \n",
      " |  __setstate__(self, state)\n",
      " |  \n",
      " |  as_dummy(self)\n",
      " |      Return the expression with any objects having structurally\n",
      " |      bound symbols replaced with unique, canonical symbols within\n",
      " |      the object in which they appear and having only the default\n",
      " |      assumption for commutativity being True. When applied to a\n",
      " |      symbol a new symbol having only the same commutativity will be\n",
      " |      returned.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Integral, Symbol\n",
      " |      >>> from sympy.abc import x\n",
      " |      >>> r = Symbol('r', real=True)\n",
      " |      >>> Integral(r, (r, x)).as_dummy()\n",
      " |      Integral(_0, (_0, x))\n",
      " |      >>> _.variables[0].is_real is None\n",
      " |      True\n",
      " |      >>> r.as_dummy()\n",
      " |      _r\n",
      " |      \n",
      " |      Notes\n",
      " |      =====\n",
      " |      \n",
      " |      Any object that has structurally bound variables should have\n",
      " |      a property, `bound_symbols` that returns those symbols\n",
      " |      appearing in the object.\n",
      " |  \n",
      " |  atoms(self, *types)\n",
      " |      Returns the atoms that form the current object.\n",
      " |      \n",
      " |      By default, only objects that are truly atomic and cannot\n",
      " |      be divided into smaller pieces are returned: symbols, numbers,\n",
      " |      and number symbols like I and pi. It is possible to request\n",
      " |      atoms of any type, however, as demonstrated below.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import I, pi, sin\n",
      " |      >>> from sympy.abc import x, y\n",
      " |      >>> (1 + x + 2*sin(y + I*pi)).atoms()\n",
      " |      {1, 2, I, pi, x, y}\n",
      " |      \n",
      " |      If one or more types are given, the results will contain only\n",
      " |      those types of atoms.\n",
      " |      \n",
      " |      >>> from sympy import Number, NumberSymbol, Symbol\n",
      " |      >>> (1 + x + 2*sin(y + I*pi)).atoms(Symbol)\n",
      " |      {x, y}\n",
      " |      \n",
      " |      >>> (1 + x + 2*sin(y + I*pi)).atoms(Number)\n",
      " |      {1, 2}\n",
      " |      \n",
      " |      >>> (1 + x + 2*sin(y + I*pi)).atoms(Number, NumberSymbol)\n",
      " |      {1, 2, pi}\n",
      " |      \n",
      " |      >>> (1 + x + 2*sin(y + I*pi)).atoms(Number, NumberSymbol, I)\n",
      " |      {1, 2, I, pi}\n",
      " |      \n",
      " |      Note that I (imaginary unit) and zoo (complex infinity) are special\n",
      " |      types of number symbols and are not part of the NumberSymbol class.\n",
      " |      \n",
      " |      The type can be given implicitly, too:\n",
      " |      \n",
      " |      >>> (1 + x + 2*sin(y + I*pi)).atoms(x) # x is a Symbol\n",
      " |      {x, y}\n",
      " |      \n",
      " |      Be careful to check your assumptions when using the implicit option\n",
      " |      since ``S(1).is_Integer = True`` but ``type(S(1))`` is ``One``, a special type\n",
      " |      of SymPy atom, while ``type(S(2))`` is type ``Integer`` and will find all\n",
      " |      integers in an expression:\n",
      " |      \n",
      " |      >>> from sympy import S\n",
      " |      >>> (1 + x + 2*sin(y + I*pi)).atoms(S(1))\n",
      " |      {1}\n",
      " |      \n",
      " |      >>> (1 + x + 2*sin(y + I*pi)).atoms(S(2))\n",
      " |      {1, 2}\n",
      " |      \n",
      " |      Finally, arguments to atoms() can select more than atomic atoms: any\n",
      " |      SymPy type (loaded in core/__init__.py) can be listed as an argument\n",
      " |      and those types of \"atoms\" as found in scanning the arguments of the\n",
      " |      expression recursively:\n",
      " |      \n",
      " |      >>> from sympy import Function, Mul\n",
      " |      >>> from sympy.core.function import AppliedUndef\n",
      " |      >>> f = Function('f')\n",
      " |      >>> (1 + f(x) + 2*sin(y + I*pi)).atoms(Function)\n",
      " |      {f(x), sin(y + I*pi)}\n",
      " |      >>> (1 + f(x) + 2*sin(y + I*pi)).atoms(AppliedUndef)\n",
      " |      {f(x)}\n",
      " |      \n",
      " |      >>> (1 + x + 2*sin(y + I*pi)).atoms(Mul)\n",
      " |      {I*pi, 2*sin(y + I*pi)}\n",
      " |  \n",
      " |  compare(self, other)\n",
      " |      Return -1, 0, 1 if the object is smaller, equal, or greater than other.\n",
      " |      \n",
      " |      Not in the mathematical sense. If the object is of a different type\n",
      " |      from the \"other\" then their classes are ordered according to\n",
      " |      the sorted_classes list.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy.abc import x, y\n",
      " |      >>> x.compare(y)\n",
      " |      -1\n",
      " |      >>> x.compare(x)\n",
      " |      0\n",
      " |      >>> y.compare(x)\n",
      " |      1\n",
      " |  \n",
      " |  copy(self)\n",
      " |  \n",
      " |  count(self, query)\n",
      " |      Count the number of matching subexpressions.\n",
      " |  \n",
      " |  dummy_eq(self, other, symbol=None)\n",
      " |      Compare two expressions and handle dummy symbols.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Dummy\n",
      " |      >>> from sympy.abc import x, y\n",
      " |      \n",
      " |      >>> u = Dummy('u')\n",
      " |      \n",
      " |      >>> (u**2 + 1).dummy_eq(x**2 + 1)\n",
      " |      True\n",
      " |      >>> (u**2 + 1) == (x**2 + 1)\n",
      " |      False\n",
      " |      \n",
      " |      >>> (u**2 + y).dummy_eq(x**2 + y, x)\n",
      " |      True\n",
      " |      >>> (u**2 + y).dummy_eq(x**2 + y, y)\n",
      " |      False\n",
      " |  \n",
      " |  find(self, query, group=False)\n",
      " |      Find all subexpressions matching a query.\n",
      " |  \n",
      " |  has(self, *patterns)\n",
      " |      Test whether any subexpression matches any of the patterns.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import sin\n",
      " |      >>> from sympy.abc import x, y, z\n",
      " |      >>> (x**2 + sin(x*y)).has(z)\n",
      " |      False\n",
      " |      >>> (x**2 + sin(x*y)).has(x, y, z)\n",
      " |      True\n",
      " |      >>> x.has(x)\n",
      " |      True\n",
      " |      \n",
      " |      Note ``has`` is a structural algorithm with no knowledge of\n",
      " |      mathematics. Consider the following half-open interval:\n",
      " |      \n",
      " |      >>> from sympy import Interval\n",
      " |      >>> i = Interval.Lopen(0, 5); i\n",
      " |      Interval.Lopen(0, 5)\n",
      " |      >>> i.args\n",
      " |      (0, 5, True, False)\n",
      " |      >>> i.has(4)  # there is no \"4\" in the arguments\n",
      " |      False\n",
      " |      >>> i.has(0)  # there *is* a \"0\" in the arguments\n",
      " |      True\n",
      " |      \n",
      " |      Instead, use ``contains`` to determine whether a number is in the\n",
      " |      interval or not:\n",
      " |      \n",
      " |      >>> i.contains(4)\n",
      " |      True\n",
      " |      >>> i.contains(0)\n",
      " |      False\n",
      " |      \n",
      " |      \n",
      " |      Note that ``expr.has(*patterns)`` is exactly equivalent to\n",
      " |      ``any(expr.has(p) for p in patterns)``. In particular, ``False`` is\n",
      " |      returned when the list of patterns is empty.\n",
      " |      \n",
      " |      >>> x.has()\n",
      " |      False\n",
      " |  \n",
      " |  has_free(self, *patterns)\n",
      " |      Return True if self has object(s) ``x`` as a free expression\n",
      " |      else False.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Integral, Function\n",
      " |      >>> from sympy.abc import x, y\n",
      " |      >>> f = Function('f')\n",
      " |      >>> g = Function('g')\n",
      " |      >>> expr = Integral(f(x), (f(x), 1, g(y)))\n",
      " |      >>> expr.free_symbols\n",
      " |      {y}\n",
      " |      >>> expr.has_free(g(y))\n",
      " |      True\n",
      " |      >>> expr.has_free(*(x, f(x)))\n",
      " |      False\n",
      " |      \n",
      " |      This works for subexpressions and types, too:\n",
      " |      \n",
      " |      >>> expr.has_free(g)\n",
      " |      True\n",
      " |      >>> (x + y + 1).has_free(y + 1)\n",
      " |      True\n",
      " |  \n",
      " |  has_xfree(self, s: 'set[Basic]')\n",
      " |      Return True if self has any of the patterns in s as a\n",
      " |      free argument, else False. This is like `Basic.has_free`\n",
      " |      but this will only report exact argument matches.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Function\n",
      " |      >>> from sympy.abc import x, y\n",
      " |      >>> f = Function('f')\n",
      " |      >>> f(x).has_xfree({f})\n",
      " |      False\n",
      " |      >>> f(x).has_xfree({f(x)})\n",
      " |      True\n",
      " |      >>> f(x + 1).has_xfree({x})\n",
      " |      True\n",
      " |      >>> f(x + 1).has_xfree({x + 1})\n",
      " |      True\n",
      " |      >>> f(x + y + 1).has_xfree({x + 1})\n",
      " |      False\n",
      " |  \n",
      " |  is_hypergeometric(self, k)\n",
      " |  \n",
      " |  match(self, pattern, old=False)\n",
      " |      Pattern matching.\n",
      " |      \n",
      " |      Wild symbols match all.\n",
      " |      \n",
      " |      Return ``None`` when expression (self) does not match\n",
      " |      with pattern. Otherwise return a dictionary such that::\n",
      " |      \n",
      " |        pattern.xreplace(self.match(pattern)) == self\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Wild, Sum\n",
      " |      >>> from sympy.abc import x, y\n",
      " |      >>> p = Wild(\"p\")\n",
      " |      >>> q = Wild(\"q\")\n",
      " |      >>> r = Wild(\"r\")\n",
      " |      >>> e = (x+y)**(x+y)\n",
      " |      >>> e.match(p**p)\n",
      " |      {p_: x + y}\n",
      " |      >>> e.match(p**q)\n",
      " |      {p_: x + y, q_: x + y}\n",
      " |      >>> e = (2*x)**2\n",
      " |      >>> e.match(p*q**r)\n",
      " |      {p_: 4, q_: x, r_: 2}\n",
      " |      >>> (p*q**r).xreplace(e.match(p*q**r))\n",
      " |      4*x**2\n",
      " |      \n",
      " |      Structurally bound symbols are ignored during matching:\n",
      " |      \n",
      " |      >>> Sum(x, (x, 1, 2)).match(Sum(y, (y, 1, p)))\n",
      " |      {p_: 2}\n",
      " |      \n",
      " |      But they can be identified if desired:\n",
      " |      \n",
      " |      >>> Sum(x, (x, 1, 2)).match(Sum(q, (q, 1, p)))\n",
      " |      {p_: 2, q_: x}\n",
      " |      \n",
      " |      The ``old`` flag will give the old-style pattern matching where\n",
      " |      expressions and patterns are essentially solved to give the\n",
      " |      match. Both of the following give None unless ``old=True``:\n",
      " |      \n",
      " |      >>> (x - 2).match(p - x, old=True)\n",
      " |      {p_: 2*x - 2}\n",
      " |      >>> (2/x).match(p*x, old=True)\n",
      " |      {p_: 2/x**2}\n",
      " |  \n",
      " |  matches(self, expr, repl_dict=None, old=False)\n",
      " |      Helper method for match() that looks for a match between Wild symbols\n",
      " |      in self and expressions in expr.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import symbols, Wild, Basic\n",
      " |      >>> a, b, c = symbols('a b c')\n",
      " |      >>> x = Wild('x')\n",
      " |      >>> Basic(a + x, x).matches(Basic(a + b, c)) is None\n",
      " |      True\n",
      " |      >>> Basic(a + x, x).matches(Basic(a + b + c, b + c))\n",
      " |      {x_: b + c}\n",
      " |  \n",
      " |  rcall(self, *args)\n",
      " |      Apply on the argument recursively through the expression tree.\n",
      " |      \n",
      " |      This method is used to simulate a common abuse of notation for\n",
      " |      operators. For instance, in SymPy the following will not work:\n",
      " |      \n",
      " |      ``(x+Lambda(y, 2*y))(z) == x+2*z``,\n",
      " |      \n",
      " |      however, you can use:\n",
      " |      \n",
      " |      >>> from sympy import Lambda\n",
      " |      >>> from sympy.abc import x, y, z\n",
      " |      >>> (x + Lambda(y, 2*y)).rcall(z)\n",
      " |      x + 2*z\n",
      " |  \n",
      " |  refine(self, assumption=True)\n",
      " |      See the refine function in sympy.assumptions\n",
      " |  \n",
      " |  replace(self, query, value, map=False, simultaneous=True, exact=None)\n",
      " |      Replace matching subexpressions of ``self`` with ``value``.\n",
      " |      \n",
      " |      If ``map = True`` then also return the mapping {old: new} where ``old``\n",
      " |      was a sub-expression found with query and ``new`` is the replacement\n",
      " |      value for it. If the expression itself does not match the query, then\n",
      " |      the returned value will be ``self.xreplace(map)`` otherwise it should\n",
      " |      be ``self.subs(ordered(map.items()))``.\n",
      " |      \n",
      " |      Traverses an expression tree and performs replacement of matching\n",
      " |      subexpressions from the bottom to the top of the tree. The default\n",
      " |      approach is to do the replacement in a simultaneous fashion so\n",
      " |      changes made are targeted only once. If this is not desired or causes\n",
      " |      problems, ``simultaneous`` can be set to False.\n",
      " |      \n",
      " |      In addition, if an expression containing more than one Wild symbol\n",
      " |      is being used to match subexpressions and the ``exact`` flag is None\n",
      " |      it will be set to True so the match will only succeed if all non-zero\n",
      " |      values are received for each Wild that appears in the match pattern.\n",
      " |      Setting this to False accepts a match of 0; while setting it True\n",
      " |      accepts all matches that have a 0 in them. See example below for\n",
      " |      cautions.\n",
      " |      \n",
      " |      The list of possible combinations of queries and replacement values\n",
      " |      is listed below:\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      Initial setup\n",
      " |      \n",
      " |      >>> from sympy import log, sin, cos, tan, Wild, Mul, Add\n",
      " |      >>> from sympy.abc import x, y\n",
      " |      >>> f = log(sin(x)) + tan(sin(x**2))\n",
      " |      \n",
      " |      1.1. type -> type\n",
      " |          obj.replace(type, newtype)\n",
      " |      \n",
      " |          When object of type ``type`` is found, replace it with the\n",
      " |          result of passing its argument(s) to ``newtype``.\n",
      " |      \n",
      " |          >>> f.replace(sin, cos)\n",
      " |          log(cos(x)) + tan(cos(x**2))\n",
      " |          >>> sin(x).replace(sin, cos, map=True)\n",
      " |          (cos(x), {sin(x): cos(x)})\n",
      " |          >>> (x*y).replace(Mul, Add)\n",
      " |          x + y\n",
      " |      \n",
      " |      1.2. type -> func\n",
      " |          obj.replace(type, func)\n",
      " |      \n",
      " |          When object of type ``type`` is found, apply ``func`` to its\n",
      " |          argument(s). ``func`` must be written to handle the number\n",
      " |          of arguments of ``type``.\n",
      " |      \n",
      " |          >>> f.replace(sin, lambda arg: sin(2*arg))\n",
      " |          log(sin(2*x)) + tan(sin(2*x**2))\n",
      " |          >>> (x*y).replace(Mul, lambda *args: sin(2*Mul(*args)))\n",
      " |          sin(2*x*y)\n",
      " |      \n",
      " |      2.1. pattern -> expr\n",
      " |          obj.replace(pattern(wild), expr(wild))\n",
      " |      \n",
      " |          Replace subexpressions matching ``pattern`` with the expression\n",
      " |          written in terms of the Wild symbols in ``pattern``.\n",
      " |      \n",
      " |          >>> a, b = map(Wild, 'ab')\n",
      " |          >>> f.replace(sin(a), tan(a))\n",
      " |          log(tan(x)) + tan(tan(x**2))\n",
      " |          >>> f.replace(sin(a), tan(a/2))\n",
      " |          log(tan(x/2)) + tan(tan(x**2/2))\n",
      " |          >>> f.replace(sin(a), a)\n",
      " |          log(x) + tan(x**2)\n",
      " |          >>> (x*y).replace(a*x, a)\n",
      " |          y\n",
      " |      \n",
      " |          Matching is exact by default when more than one Wild symbol\n",
      " |          is used: matching fails unless the match gives non-zero\n",
      " |          values for all Wild symbols:\n",
      " |      \n",
      " |          >>> (2*x + y).replace(a*x + b, b - a)\n",
      " |          y - 2\n",
      " |          >>> (2*x).replace(a*x + b, b - a)\n",
      " |          2*x\n",
      " |      \n",
      " |          When set to False, the results may be non-intuitive:\n",
      " |      \n",
      " |          >>> (2*x).replace(a*x + b, b - a, exact=False)\n",
      " |          2/x\n",
      " |      \n",
      " |      2.2. pattern -> func\n",
      " |          obj.replace(pattern(wild), lambda wild: expr(wild))\n",
      " |      \n",
      " |          All behavior is the same as in 2.1 but now a function in terms of\n",
      " |          pattern variables is used rather than an expression:\n",
      " |      \n",
      " |          >>> f.replace(sin(a), lambda a: sin(2*a))\n",
      " |          log(sin(2*x)) + tan(sin(2*x**2))\n",
      " |      \n",
      " |      3.1. func -> func\n",
      " |          obj.replace(filter, func)\n",
      " |      \n",
      " |          Replace subexpression ``e`` with ``func(e)`` if ``filter(e)``\n",
      " |          is True.\n",
      " |      \n",
      " |          >>> g = 2*sin(x**3)\n",
      " |          >>> g.replace(lambda expr: expr.is_Number, lambda expr: expr**2)\n",
      " |          4*sin(x**9)\n",
      " |      \n",
      " |      The expression itself is also targeted by the query but is done in\n",
      " |      such a fashion that changes are not made twice.\n",
      " |      \n",
      " |          >>> e = x*(x*y + 1)\n",
      " |          >>> e.replace(lambda x: x.is_Mul, lambda x: 2*x)\n",
      " |          2*x*(2*x*y + 1)\n",
      " |      \n",
      " |      When matching a single symbol, `exact` will default to True, but\n",
      " |      this may or may not be the behavior that is desired:\n",
      " |      \n",
      " |      Here, we want `exact=False`:\n",
      " |      \n",
      " |      >>> from sympy import Function\n",
      " |      >>> f = Function('f')\n",
      " |      >>> e = f(1) + f(0)\n",
      " |      >>> q = f(a), lambda a: f(a + 1)\n",
      " |      >>> e.replace(*q, exact=False)\n",
      " |      f(1) + f(2)\n",
      " |      >>> e.replace(*q, exact=True)\n",
      " |      f(0) + f(2)\n",
      " |      \n",
      " |      But here, the nature of matching makes selecting\n",
      " |      the right setting tricky:\n",
      " |      \n",
      " |      >>> e = x**(1 + y)\n",
      " |      >>> (x**(1 + y)).replace(x**(1 + a), lambda a: x**-a, exact=False)\n",
      " |      x\n",
      " |      >>> (x**(1 + y)).replace(x**(1 + a), lambda a: x**-a, exact=True)\n",
      " |      x**(-x - y + 1)\n",
      " |      >>> (x**y).replace(x**(1 + a), lambda a: x**-a, exact=False)\n",
      " |      x\n",
      " |      >>> (x**y).replace(x**(1 + a), lambda a: x**-a, exact=True)\n",
      " |      x**(1 - y)\n",
      " |      \n",
      " |      It is probably better to use a different form of the query\n",
      " |      that describes the target expression more precisely:\n",
      " |      \n",
      " |      >>> (1 + x**(1 + y)).replace(\n",
      " |      ... lambda x: x.is_Pow and x.exp.is_Add and x.exp.args[0] == 1,\n",
      " |      ... lambda x: x.base**(1 - (x.exp - 1)))\n",
      " |      ...\n",
      " |      x**(1 - y) + 1\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      subs: substitution of subexpressions as defined by the objects\n",
      " |            themselves.\n",
      " |      xreplace: exact node replacement in expr tree; also capable of\n",
      " |                using matching rules\n",
      " |  \n",
      " |  rewrite(self, *args, deep=True, **hints)\n",
      " |      Rewrite *self* using a defined rule.\n",
      " |      \n",
      " |      Rewriting transforms an expression to another, which is mathematically\n",
      " |      equivalent but structurally different. For example you can rewrite\n",
      " |      trigonometric functions as complex exponentials or combinatorial\n",
      " |      functions as gamma function.\n",
      " |      \n",
      " |      This method takes a *pattern* and a *rule* as positional arguments.\n",
      " |      *pattern* is optional parameter which defines the types of expressions\n",
      " |      that will be transformed. If it is not passed, all possible expressions\n",
      " |      will be rewritten. *rule* defines how the expression will be rewritten.\n",
      " |      \n",
      " |      Parameters\n",
      " |      ==========\n",
      " |      \n",
      " |      args : Expr\n",
      " |          A *rule*, or *pattern* and *rule*.\n",
      " |          - *pattern* is a type or an iterable of types.\n",
      " |          - *rule* can be any object.\n",
      " |      \n",
      " |      deep : bool, optional\n",
      " |          If ``True``, subexpressions are recursively transformed. Default is\n",
      " |          ``True``.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      If *pattern* is unspecified, all possible expressions are transformed.\n",
      " |      \n",
      " |      >>> from sympy import cos, sin, exp, I\n",
      " |      >>> from sympy.abc import x\n",
      " |      >>> expr = cos(x) + I*sin(x)\n",
      " |      >>> expr.rewrite(exp)\n",
      " |      exp(I*x)\n",
      " |      \n",
      " |      Pattern can be a type or an iterable of types.\n",
      " |      \n",
      " |      >>> expr.rewrite(sin, exp)\n",
      " |      exp(I*x)/2 + cos(x) - exp(-I*x)/2\n",
      " |      >>> expr.rewrite([cos,], exp)\n",
      " |      exp(I*x)/2 + I*sin(x) + exp(-I*x)/2\n",
      " |      >>> expr.rewrite([cos, sin], exp)\n",
      " |      exp(I*x)\n",
      " |      \n",
      " |      Rewriting behavior can be implemented by defining ``_eval_rewrite()``\n",
      " |      method.\n",
      " |      \n",
      " |      >>> from sympy import Expr, sqrt, pi\n",
      " |      >>> class MySin(Expr):\n",
      " |      ...     def _eval_rewrite(self, rule, args, **hints):\n",
      " |      ...         x, = args\n",
      " |      ...         if rule == cos:\n",
      " |      ...             return cos(pi/2 - x, evaluate=False)\n",
      " |      ...         if rule == sqrt:\n",
      " |      ...             return sqrt(1 - cos(x)**2)\n",
      " |      >>> MySin(MySin(x)).rewrite(cos)\n",
      " |      cos(-cos(-x + pi/2) + pi/2)\n",
      " |      >>> MySin(x).rewrite(sqrt)\n",
      " |      sqrt(1 - cos(x)**2)\n",
      " |      \n",
      " |      Defining ``_eval_rewrite_as_[...]()`` method is supported for backwards\n",
      " |      compatibility reason. This may be removed in the future and using it is\n",
      " |      discouraged.\n",
      " |      \n",
      " |      >>> class MySin(Expr):\n",
      " |      ...     def _eval_rewrite_as_cos(self, *args, **hints):\n",
      " |      ...         x, = args\n",
      " |      ...         return cos(pi/2 - x, evaluate=False)\n",
      " |      >>> MySin(x).rewrite(cos)\n",
      " |      cos(-x + pi/2)\n",
      " |  \n",
      " |  simplify(self, **kwargs)\n",
      " |      See the simplify function in sympy.simplify\n",
      " |  \n",
      " |  subs(self, *args, **kwargs)\n",
      " |      Substitutes old for new in an expression after sympifying args.\n",
      " |      \n",
      " |      `args` is either:\n",
      " |        - two arguments, e.g. foo.subs(old, new)\n",
      " |        - one iterable argument, e.g. foo.subs(iterable). The iterable may be\n",
      " |           o an iterable container with (old, new) pairs. In this case the\n",
      " |             replacements are processed in the order given with successive\n",
      " |             patterns possibly affecting replacements already made.\n",
      " |           o a dict or set whose key/value items correspond to old/new pairs.\n",
      " |             In this case the old/new pairs will be sorted by op count and in\n",
      " |             case of a tie, by number of args and the default_sort_key. The\n",
      " |             resulting sorted list is then processed as an iterable container\n",
      " |             (see previous).\n",
      " |      \n",
      " |      If the keyword ``simultaneous`` is True, the subexpressions will not be\n",
      " |      evaluated until all the substitutions have been made.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import pi, exp, limit, oo\n",
      " |      >>> from sympy.abc import x, y\n",
      " |      >>> (1 + x*y).subs(x, pi)\n",
      " |      pi*y + 1\n",
      " |      >>> (1 + x*y).subs({x:pi, y:2})\n",
      " |      1 + 2*pi\n",
      " |      >>> (1 + x*y).subs([(x, pi), (y, 2)])\n",
      " |      1 + 2*pi\n",
      " |      >>> reps = [(y, x**2), (x, 2)]\n",
      " |      >>> (x + y).subs(reps)\n",
      " |      6\n",
      " |      >>> (x + y).subs(reversed(reps))\n",
      " |      x**2 + 2\n",
      " |      \n",
      " |      >>> (x**2 + x**4).subs(x**2, y)\n",
      " |      y**2 + y\n",
      " |      \n",
      " |      To replace only the x**2 but not the x**4, use xreplace:\n",
      " |      \n",
      " |      >>> (x**2 + x**4).xreplace({x**2: y})\n",
      " |      x**4 + y\n",
      " |      \n",
      " |      To delay evaluation until all substitutions have been made,\n",
      " |      set the keyword ``simultaneous`` to True:\n",
      " |      \n",
      " |      >>> (x/y).subs([(x, 0), (y, 0)])\n",
      " |      0\n",
      " |      >>> (x/y).subs([(x, 0), (y, 0)], simultaneous=True)\n",
      " |      nan\n",
      " |      \n",
      " |      This has the added feature of not allowing subsequent substitutions\n",
      " |      to affect those already made:\n",
      " |      \n",
      " |      >>> ((x + y)/y).subs({x + y: y, y: x + y})\n",
      " |      1\n",
      " |      >>> ((x + y)/y).subs({x + y: y, y: x + y}, simultaneous=True)\n",
      " |      y/(x + y)\n",
      " |      \n",
      " |      In order to obtain a canonical result, unordered iterables are\n",
      " |      sorted by count_op length, number of arguments and by the\n",
      " |      default_sort_key to break any ties. All other iterables are left\n",
      " |      unsorted.\n",
      " |      \n",
      " |      >>> from sympy import sqrt, sin, cos\n",
      " |      >>> from sympy.abc import a, b, c, d, e\n",
      " |      \n",
      " |      >>> A = (sqrt(sin(2*x)), a)\n",
      " |      >>> B = (sin(2*x), b)\n",
      " |      >>> C = (cos(2*x), c)\n",
      " |      >>> D = (x, d)\n",
      " |      >>> E = (exp(x), e)\n",
      " |      \n",
      " |      >>> expr = sqrt(sin(2*x))*sin(exp(x)*x)*cos(2*x) + sin(2*x)\n",
      " |      \n",
      " |      >>> expr.subs(dict([A, B, C, D, E]))\n",
      " |      a*c*sin(d*e) + b\n",
      " |      \n",
      " |      The resulting expression represents a literal replacement of the\n",
      " |      old arguments with the new arguments. This may not reflect the\n",
      " |      limiting behavior of the expression:\n",
      " |      \n",
      " |      >>> (x**3 - 3*x).subs({x: oo})\n",
      " |      nan\n",
      " |      \n",
      " |      >>> limit(x**3 - 3*x, x, oo)\n",
      " |      oo\n",
      " |      \n",
      " |      If the substitution will be followed by numerical\n",
      " |      evaluation, it is better to pass the substitution to\n",
      " |      evalf as\n",
      " |      \n",
      " |      >>> (1/x).evalf(subs={x: 3.0}, n=21)\n",
      " |      0.333333333333333333333\n",
      " |      \n",
      " |      rather than\n",
      " |      \n",
      " |      >>> (1/x).subs({x: 3.0}).evalf(21)\n",
      " |      0.333333333333333314830\n",
      " |      \n",
      " |      as the former will ensure that the desired level of precision is\n",
      " |      obtained.\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      replace: replacement capable of doing wildcard-like matching,\n",
      " |               parsing of match, and conditional replacements\n",
      " |      xreplace: exact node replacement in expr tree; also capable of\n",
      " |                using matching rules\n",
      " |      sympy.core.evalf.EvalfMixin.evalf: calculates the given formula to a desired level of precision\n",
      " |  \n",
      " |  xreplace lambda rule, **_\n",
      " |      # Function needs args so we define a property that returns\n",
      " |      # a function that takes args...and then use that function\n",
      " |      # to return the right value\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Class methods inherited from sympy.core.basic.Basic:\n",
      " |  \n",
      " |  __init_subclass__() from sympy.core.function.FunctionClass\n",
      " |      This method is called when a class is subclassed.\n",
      " |      \n",
      " |      The default implementation does nothing. It may be\n",
      " |      overridden to extend subclasses.\n",
      " |  \n",
      " |  class_key() from sympy.core.function.FunctionClass\n",
      " |      Nice order of classes.\n",
      " |  \n",
      " |  fromiter(args, **assumptions) from sympy.core.function.FunctionClass\n",
      " |      Create a new object from an iterable.\n",
      " |      \n",
      " |      This is a convenience function that allows one to create objects from\n",
      " |      any iterable, without having to convert to a list or tuple first.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Tuple\n",
      " |      >>> Tuple.fromiter(i for i in range(5))\n",
      " |      (0, 1, 2, 3, 4)\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Readonly properties inherited from sympy.core.basic.Basic:\n",
      " |  \n",
      " |  __sympy__\n",
      " |  \n",
      " |  args\n",
      " |      Returns a tuple of arguments of 'self'.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import cot\n",
      " |      >>> from sympy.abc import x, y\n",
      " |      \n",
      " |      >>> cot(x).args\n",
      " |      (x,)\n",
      " |      \n",
      " |      >>> cot(x).args[0]\n",
      " |      x\n",
      " |      \n",
      " |      >>> (x*y).args\n",
      " |      (x, y)\n",
      " |      \n",
      " |      >>> (x*y).args[1]\n",
      " |      y\n",
      " |      \n",
      " |      Notes\n",
      " |      =====\n",
      " |      \n",
      " |      Never use self._args, always use self.args.\n",
      " |      Only use _args in __new__ when creating a new function.\n",
      " |      Do not override .args() from Basic (so that it is easy to\n",
      " |      change the interface in the future if needed).\n",
      " |  \n",
      " |  assumptions0\n",
      " |      Return object `type` assumptions.\n",
      " |      \n",
      " |      For example:\n",
      " |      \n",
      " |        Symbol('x', real=True)\n",
      " |        Symbol('x', integer=True)\n",
      " |      \n",
      " |      are different objects. In other words, besides Python type (Symbol in\n",
      " |      this case), the initial assumptions are also forming their typeinfo.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Symbol\n",
      " |      >>> from sympy.abc import x\n",
      " |      >>> x.assumptions0\n",
      " |      {'commutative': True}\n",
      " |      >>> x = Symbol(\"x\", positive=True)\n",
      " |      >>> x.assumptions0\n",
      " |      {'commutative': True, 'complex': True, 'extended_negative': False,\n",
      " |       'extended_nonnegative': True, 'extended_nonpositive': False,\n",
      " |       'extended_nonzero': True, 'extended_positive': True, 'extended_real':\n",
      " |       True, 'finite': True, 'hermitian': True, 'imaginary': False,\n",
      " |       'infinite': False, 'negative': False, 'nonnegative': True,\n",
      " |       'nonpositive': False, 'nonzero': True, 'positive': True, 'real':\n",
      " |       True, 'zero': False}\n",
      " |  \n",
      " |  canonical_variables\n",
      " |      Return a dictionary mapping any variable defined in\n",
      " |      ``self.bound_symbols`` to Symbols that do not clash\n",
      " |      with any free symbols in the expression.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Lambda\n",
      " |      >>> from sympy.abc import x\n",
      " |      >>> Lambda(x, 2*x).canonical_variables\n",
      " |      {x: _0}\n",
      " |  \n",
      " |  free_symbols\n",
      " |      Return from the atoms of self those which are free symbols.\n",
      " |      \n",
      " |      Not all free symbols are ``Symbol``. Eg: IndexedBase('I')[0].free_symbols\n",
      " |      \n",
      " |      For most expressions, all symbols are free symbols. For some classes\n",
      " |      this is not true. e.g. Integrals use Symbols for the dummy variables\n",
      " |      which are bound variables, so Integral has a method to return all\n",
      " |      symbols except those. Derivative keeps track of symbols with respect\n",
      " |      to which it will perform a derivative; those are\n",
      " |      bound variables, too, so it has its own free_symbols method.\n",
      " |      \n",
      " |      Any other method that uses bound variables should implement a\n",
      " |      free_symbols method.\n",
      " |  \n",
      " |  is_algebraic\n",
      " |  \n",
      " |  is_antihermitian\n",
      " |  \n",
      " |  is_comparable\n",
      " |      Return True if self can be computed to a real number\n",
      " |      (or already is a real number) with precision, else False.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import exp_polar, pi, I\n",
      " |      >>> (I*exp_polar(I*pi/2)).is_comparable\n",
      " |      True\n",
      " |      >>> (I*exp_polar(I*pi*2)).is_comparable\n",
      " |      False\n",
      " |      \n",
      " |      A False result does not mean that `self` cannot be rewritten\n",
      " |      into a form that would be comparable. For example, the\n",
      " |      difference computed below is zero but without simplification\n",
      " |      it does not evaluate to a zero with precision:\n",
      " |      \n",
      " |      >>> e = 2**pi*(1 + 2**pi)\n",
      " |      >>> dif = e - e.expand()\n",
      " |      >>> dif.is_comparable\n",
      " |      False\n",
      " |      >>> dif.n(2)._prec\n",
      " |      1\n",
      " |  \n",
      " |  is_complex\n",
      " |  \n",
      " |  is_composite\n",
      " |  \n",
      " |  is_even\n",
      " |  \n",
      " |  is_extended_negative\n",
      " |  \n",
      " |  is_extended_nonnegative\n",
      " |  \n",
      " |  is_extended_nonpositive\n",
      " |  \n",
      " |  is_extended_nonzero\n",
      " |  \n",
      " |  is_extended_positive\n",
      " |  \n",
      " |  is_extended_real\n",
      " |  \n",
      " |  is_finite\n",
      " |  \n",
      " |  is_hermitian\n",
      " |  \n",
      " |  is_imaginary\n",
      " |  \n",
      " |  is_infinite\n",
      " |  \n",
      " |  is_integer\n",
      " |  \n",
      " |  is_irrational\n",
      " |  \n",
      " |  is_negative\n",
      " |  \n",
      " |  is_noninteger\n",
      " |  \n",
      " |  is_nonnegative\n",
      " |  \n",
      " |  is_nonpositive\n",
      " |  \n",
      " |  is_nonzero\n",
      " |  \n",
      " |  is_odd\n",
      " |  \n",
      " |  is_polar\n",
      " |  \n",
      " |  is_positive\n",
      " |  \n",
      " |  is_prime\n",
      " |  \n",
      " |  is_rational\n",
      " |  \n",
      " |  is_real\n",
      " |  \n",
      " |  is_transcendental\n",
      " |  \n",
      " |  is_zero\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Data and other attributes inherited from sympy.core.basic.Basic:\n",
      " |  \n",
      " |  is_Add = False\n",
      " |  \n",
      " |  is_AlgebraicNumber = False\n",
      " |  \n",
      " |  is_Atom = False\n",
      " |  \n",
      " |  is_Boolean = False\n",
      " |  \n",
      " |  is_Derivative = False\n",
      " |  \n",
      " |  is_Dummy = False\n",
      " |  \n",
      " |  is_Equality = False\n",
      " |  \n",
      " |  is_Float = False\n",
      " |  \n",
      " |  is_Indexed = False\n",
      " |  \n",
      " |  is_Integer = False\n",
      " |  \n",
      " |  is_MatAdd = False\n",
      " |  \n",
      " |  is_MatMul = False\n",
      " |  \n",
      " |  is_Matrix = False\n",
      " |  \n",
      " |  is_Mul = False\n",
      " |  \n",
      " |  is_Not = False\n",
      " |  \n",
      " |  is_Number = False\n",
      " |  \n",
      " |  is_NumberSymbol = False\n",
      " |  \n",
      " |  is_Order = False\n",
      " |  \n",
      " |  is_Piecewise = False\n",
      " |  \n",
      " |  is_Point = False\n",
      " |  \n",
      " |  is_Poly = False\n",
      " |  \n",
      " |  is_Pow = False\n",
      " |  \n",
      " |  is_Rational = False\n",
      " |  \n",
      " |  is_Relational = False\n",
      " |  \n",
      " |  is_Symbol = False\n",
      " |  \n",
      " |  is_Vector = False\n",
      " |  \n",
      " |  is_Wild = False\n",
      " |  \n",
      " |  is_symbol = False\n",
      " |  \n",
      " |  kind = UndefinedKind\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Methods inherited from sympy.printing.defaults.Printable:\n",
      " |  \n",
      " |  __repr__ = __str__(self)\n",
      " |  \n",
      " |  __str__(self)\n",
      " |      Return str(self).\n",
      "\n"
     ]
    }
   ],
   "source": [
    "help(Min)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 127,
   "id": "79f23a4a",
   "metadata": {},
   "outputs": [],
   "source": [
    "f=lambda n: ((6*n-S(31))/(3*n-S(17)))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 128,
   "id": "16c4ad30",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\frac{25}{14}$"
      ],
      "text/plain": [
       "25/14"
      ]
     },
     "execution_count": 128,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "f(1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 129,
   "id": "ca60c119",
   "metadata": {},
   "outputs": [],
   "source": [
    "f_list=[f(i) for i in range(1,21)]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 132,
   "id": "a0affa59",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\frac{1}{2}$"
      ],
      "text/plain": [
       "1/2"
      ]
     },
     "execution_count": 132,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "Min(*f_list)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 133,
   "id": "54d51b00",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle 5$"
      ],
      "text/plain": [
       "5"
      ]
     },
     "execution_count": 133,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "Max(*f_list)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 134,
   "id": "15b081d6",
   "metadata": {},
   "outputs": [],
   "source": [
    "expr= (6*n-S(31))/(3*n-S(17))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 135,
   "id": "baa37247",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\frac{6 n - 31}{3 n - 17}$"
      ],
      "text/plain": [
       "(6*n - 31)/(3*n - 17)"
      ]
     },
     "execution_count": 135,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "expr"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 136,
   "id": "00614d15",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle 2 + \\frac{3}{3 n - 17}$"
      ],
      "text/plain": [
       "2 + 3/(3*n - 17)"
      ]
     },
     "execution_count": 136,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "apart(expr)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 139,
   "id": "658d8c74",
   "metadata": {},
   "outputs": [],
   "source": [
    "rel=a**2>10*(3-a)-6"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 140,
   "id": "5b0d897c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle a^{2} + 10 a - 24 > 0$"
      ],
      "text/plain": [
       "a**2 + 10*a - 24 > 0"
      ]
     },
     "execution_count": 140,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "to_side(rel)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 141,
   "id": "336bc017",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left(2, 3\\right)$"
      ],
      "text/plain": [
       "Interval.open(2, 3)"
      ]
     },
     "execution_count": 141,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "solveset(_,a,Interval.open(1,3))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 143,
   "id": "ed0922c7",
   "metadata": {},
   "outputs": [],
   "source": [
    "An=ImageSet(Lambda(n,9-2*n),Naturals)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 146,
   "id": "5a917eae",
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Help on class ConditionSet in module sympy.sets.conditionset:\n",
      "\n",
      "class ConditionSet(sympy.sets.sets.Set)\n",
      " |  ConditionSet(sym, condition, base_set=UniversalSet)\n",
      " |  \n",
      " |  Set of elements which satisfies a given condition.\n",
      " |  \n",
      " |  .. math:: \\{x \\mid \\textrm{condition}(x) = \\texttt{True}, x \\in S\\}\n",
      " |  \n",
      " |  Examples\n",
      " |  ========\n",
      " |  \n",
      " |  >>> from sympy import Symbol, S, ConditionSet, pi, Eq, sin, Interval\n",
      " |  >>> from sympy.abc import x, y, z\n",
      " |  \n",
      " |  >>> sin_sols = ConditionSet(x, Eq(sin(x), 0), Interval(0, 2*pi))\n",
      " |  >>> 2*pi in sin_sols\n",
      " |  True\n",
      " |  >>> pi/2 in sin_sols\n",
      " |  False\n",
      " |  >>> 3*pi in sin_sols\n",
      " |  False\n",
      " |  >>> 5 in ConditionSet(x, x**2 > 4, S.Reals)\n",
      " |  True\n",
      " |  \n",
      " |  If the value is not in the base set, the result is false:\n",
      " |  \n",
      " |  >>> 5 in ConditionSet(x, x**2 > 4, Interval(2, 4))\n",
      " |  False\n",
      " |  \n",
      " |  Notes\n",
      " |  =====\n",
      " |  \n",
      " |  Symbols with assumptions should be avoided or else the\n",
      " |  condition may evaluate without consideration of the set:\n",
      " |  \n",
      " |  >>> n = Symbol('n', negative=True)\n",
      " |  >>> cond = (n > 0); cond\n",
      " |  False\n",
      " |  >>> ConditionSet(n, cond, S.Integers)\n",
      " |  EmptySet\n",
      " |  \n",
      " |  Only free symbols can be changed by using `subs`:\n",
      " |  \n",
      " |  >>> c = ConditionSet(x, x < 1, {x, z})\n",
      " |  >>> c.subs(x, y)\n",
      " |  ConditionSet(x, x < 1, {y, z})\n",
      " |  \n",
      " |  To check if ``pi`` is in ``c`` use:\n",
      " |  \n",
      " |  >>> pi in c\n",
      " |  False\n",
      " |  \n",
      " |  If no base set is specified, the universal set is implied:\n",
      " |  \n",
      " |  >>> ConditionSet(x, x < 1).base_set\n",
      " |  UniversalSet\n",
      " |  \n",
      " |  Only symbols or symbol-like expressions can be used:\n",
      " |  \n",
      " |  >>> ConditionSet(x + 1, x + 1 < 1, S.Integers)\n",
      " |  Traceback (most recent call last):\n",
      " |  ...\n",
      " |  ValueError: non-symbol dummy not recognized in condition\n",
      " |  \n",
      " |  When the base set is a ConditionSet, the symbols will be\n",
      " |  unified if possible with preference for the outermost symbols:\n",
      " |  \n",
      " |  >>> ConditionSet(x, x < y, ConditionSet(z, z + y < 2, S.Integers))\n",
      " |  ConditionSet(x, (x < y) & (x + y < 2), Integers)\n",
      " |  \n",
      " |  Method resolution order:\n",
      " |      ConditionSet\n",
      " |      sympy.sets.sets.Set\n",
      " |      sympy.core.basic.Basic\n",
      " |      sympy.printing.defaults.Printable\n",
      " |      sympy.core.evalf.EvalfMixin\n",
      " |      builtins.object\n",
      " |  \n",
      " |  Methods defined here:\n",
      " |  \n",
      " |  as_relational(self, other)\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Static methods defined here:\n",
      " |  \n",
      " |  __new__(cls, sym, condition, base_set=UniversalSet)\n",
      " |      Create and return a new object.  See help(type) for accurate signature.\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Readonly properties defined here:\n",
      " |  \n",
      " |  base_set\n",
      " |  \n",
      " |  bound_symbols\n",
      " |  \n",
      " |  condition\n",
      " |  \n",
      " |  free_symbols\n",
      " |      Return from the atoms of self those which are free symbols.\n",
      " |      \n",
      " |      Not all free symbols are ``Symbol``. Eg: IndexedBase('I')[0].free_symbols\n",
      " |      \n",
      " |      For most expressions, all symbols are free symbols. For some classes\n",
      " |      this is not true. e.g. Integrals use Symbols for the dummy variables\n",
      " |      which are bound variables, so Integral has a method to return all\n",
      " |      symbols except those. Derivative keeps track of symbols with respect\n",
      " |      to which it will perform a derivative; those are\n",
      " |      bound variables, too, so it has its own free_symbols method.\n",
      " |      \n",
      " |      Any other method that uses bound variables should implement a\n",
      " |      free_symbols method.\n",
      " |  \n",
      " |  sym\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Data descriptors defined here:\n",
      " |  \n",
      " |  __dict__\n",
      " |      dictionary for instance variables (if defined)\n",
      " |  \n",
      " |  __weakref__\n",
      " |      list of weak references to the object (if defined)\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Data and other attributes defined here:\n",
      " |  \n",
      " |  default_assumptions = {}\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Methods inherited from sympy.sets.sets.Set:\n",
      " |  \n",
      " |  __add__(self, other)\n",
      " |  \n",
      " |  __and__(self, other)\n",
      " |  \n",
      " |  __contains__(self, other)\n",
      " |  \n",
      " |  __mul__(self, other)\n",
      " |  \n",
      " |  __or__(self, other)\n",
      " |  \n",
      " |  __pow__(self, exp)\n",
      " |  \n",
      " |  __sub__(self, other)\n",
      " |  \n",
      " |  __xor__(self, other)\n",
      " |  \n",
      " |  complement(self, universe)\n",
      " |      The complement of 'self' w.r.t the given universe.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Interval, S\n",
      " |      >>> Interval(0, 1).complement(S.Reals)\n",
      " |      Union(Interval.open(-oo, 0), Interval.open(1, oo))\n",
      " |      \n",
      " |      >>> Interval(0, 1).complement(S.UniversalSet)\n",
      " |      Complement(UniversalSet, Interval(0, 1))\n",
      " |  \n",
      " |  contains(self, other)\n",
      " |      Returns a SymPy value indicating whether ``other`` is contained\n",
      " |      in ``self``: ``true`` if it is, ``false`` if it is not, else\n",
      " |      an unevaluated ``Contains`` expression (or, as in the case of\n",
      " |      ConditionSet and a union of FiniteSet/Intervals, an expression\n",
      " |      indicating the conditions for containment).\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Interval, S\n",
      " |      >>> from sympy.abc import x\n",
      " |      \n",
      " |      >>> Interval(0, 1).contains(0.5)\n",
      " |      True\n",
      " |      \n",
      " |      As a shortcut it is possible to use the ``in`` operator, but that\n",
      " |      will raise an error unless an affirmative true or false is not\n",
      " |      obtained.\n",
      " |      \n",
      " |      >>> Interval(0, 1).contains(x)\n",
      " |      (0 <= x) & (x <= 1)\n",
      " |      >>> x in Interval(0, 1)\n",
      " |      Traceback (most recent call last):\n",
      " |      ...\n",
      " |      TypeError: did not evaluate to a bool: None\n",
      " |      \n",
      " |      The result of 'in' is a bool, not a SymPy value\n",
      " |      \n",
      " |      >>> 1 in Interval(0, 2)\n",
      " |      True\n",
      " |      >>> _ is S.true\n",
      " |      False\n",
      " |  \n",
      " |  intersect(self, other)\n",
      " |      Returns the intersection of 'self' and 'other'.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Interval\n",
      " |      \n",
      " |      >>> Interval(1, 3).intersect(Interval(1, 2))\n",
      " |      Interval(1, 2)\n",
      " |      \n",
      " |      >>> from sympy import imageset, Lambda, symbols, S\n",
      " |      >>> n, m = symbols('n m')\n",
      " |      >>> a = imageset(Lambda(n, 2*n), S.Integers)\n",
      " |      >>> a.intersect(imageset(Lambda(m, 2*m + 1), S.Integers))\n",
      " |      EmptySet\n",
      " |  \n",
      " |  intersection(self, other)\n",
      " |      Alias for :meth:`intersect()`\n",
      " |  \n",
      " |  is_disjoint(self, other)\n",
      " |      Returns True if ``self`` and ``other`` are disjoint.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Interval\n",
      " |      >>> Interval(0, 2).is_disjoint(Interval(1, 2))\n",
      " |      False\n",
      " |      >>> Interval(0, 2).is_disjoint(Interval(3, 4))\n",
      " |      True\n",
      " |      \n",
      " |      References\n",
      " |      ==========\n",
      " |      \n",
      " |      .. [1] https://en.wikipedia.org/wiki/Disjoint_sets\n",
      " |  \n",
      " |  is_proper_subset(self, other)\n",
      " |      Returns True if ``self`` is a proper subset of ``other``.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Interval\n",
      " |      >>> Interval(0, 0.5).is_proper_subset(Interval(0, 1))\n",
      " |      True\n",
      " |      >>> Interval(0, 1).is_proper_subset(Interval(0, 1))\n",
      " |      False\n",
      " |  \n",
      " |  is_proper_superset(self, other)\n",
      " |      Returns True if ``self`` is a proper superset of ``other``.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Interval\n",
      " |      >>> Interval(0, 1).is_proper_superset(Interval(0, 0.5))\n",
      " |      True\n",
      " |      >>> Interval(0, 1).is_proper_superset(Interval(0, 1))\n",
      " |      False\n",
      " |  \n",
      " |  is_subset(self, other)\n",
      " |      Returns True if ``self`` is a subset of ``other``.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Interval\n",
      " |      >>> Interval(0, 0.5).is_subset(Interval(0, 1))\n",
      " |      True\n",
      " |      >>> Interval(0, 1).is_subset(Interval(0, 1, left_open=True))\n",
      " |      False\n",
      " |  \n",
      " |  is_superset(self, other)\n",
      " |      Returns True if ``self`` is a superset of ``other``.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Interval\n",
      " |      >>> Interval(0, 0.5).is_superset(Interval(0, 1))\n",
      " |      False\n",
      " |      >>> Interval(0, 1).is_superset(Interval(0, 1, left_open=True))\n",
      " |      True\n",
      " |  \n",
      " |  isdisjoint(self, other)\n",
      " |      Alias for :meth:`is_disjoint()`\n",
      " |  \n",
      " |  issubset(self, other)\n",
      " |      Alias for :meth:`is_subset()`\n",
      " |  \n",
      " |  issuperset(self, other)\n",
      " |      Alias for :meth:`is_superset()`\n",
      " |  \n",
      " |  powerset(self)\n",
      " |      Find the Power set of ``self``.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import EmptySet, FiniteSet, Interval\n",
      " |      \n",
      " |      A power set of an empty set:\n",
      " |      \n",
      " |      >>> A = EmptySet\n",
      " |      >>> A.powerset()\n",
      " |      {EmptySet}\n",
      " |      \n",
      " |      A power set of a finite set:\n",
      " |      \n",
      " |      >>> A = FiniteSet(1, 2)\n",
      " |      >>> a, b, c = FiniteSet(1), FiniteSet(2), FiniteSet(1, 2)\n",
      " |      >>> A.powerset() == FiniteSet(a, b, c, EmptySet)\n",
      " |      True\n",
      " |      \n",
      " |      A power set of an interval:\n",
      " |      \n",
      " |      >>> Interval(1, 2).powerset()\n",
      " |      PowerSet(Interval(1, 2))\n",
      " |      \n",
      " |      References\n",
      " |      ==========\n",
      " |      \n",
      " |      .. [1] https://en.wikipedia.org/wiki/Power_set\n",
      " |  \n",
      " |  symmetric_difference(self, other)\n",
      " |      Returns symmetric difference of ``self`` and ``other``.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Interval, S\n",
      " |      >>> Interval(1, 3).symmetric_difference(S.Reals)\n",
      " |      Union(Interval.open(-oo, 1), Interval.open(3, oo))\n",
      " |      >>> Interval(1, 10).symmetric_difference(S.Reals)\n",
      " |      Union(Interval.open(-oo, 1), Interval.open(10, oo))\n",
      " |      \n",
      " |      >>> from sympy import S, EmptySet\n",
      " |      >>> S.Reals.symmetric_difference(EmptySet)\n",
      " |      Reals\n",
      " |      \n",
      " |      References\n",
      " |      ==========\n",
      " |      .. [1] https://en.wikipedia.org/wiki/Symmetric_difference\n",
      " |  \n",
      " |  union(self, other)\n",
      " |      Returns the union of ``self`` and ``other``.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      As a shortcut it is possible to use the ``+`` operator:\n",
      " |      \n",
      " |      >>> from sympy import Interval, FiniteSet\n",
      " |      >>> Interval(0, 1).union(Interval(2, 3))\n",
      " |      Union(Interval(0, 1), Interval(2, 3))\n",
      " |      >>> Interval(0, 1) + Interval(2, 3)\n",
      " |      Union(Interval(0, 1), Interval(2, 3))\n",
      " |      >>> Interval(1, 2, True, True) + FiniteSet(2, 3)\n",
      " |      Union({3}, Interval.Lopen(1, 2))\n",
      " |      \n",
      " |      Similarly it is possible to use the ``-`` operator for set differences:\n",
      " |      \n",
      " |      >>> Interval(0, 2) - Interval(0, 1)\n",
      " |      Interval.Lopen(1, 2)\n",
      " |      >>> Interval(1, 3) - FiniteSet(2)\n",
      " |      Union(Interval.Ropen(1, 2), Interval.Lopen(2, 3))\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Readonly properties inherited from sympy.sets.sets.Set:\n",
      " |  \n",
      " |  boundary\n",
      " |      The boundary or frontier of a set.\n",
      " |      \n",
      " |      Explanation\n",
      " |      ===========\n",
      " |      \n",
      " |      A point x is on the boundary of a set S if\n",
      " |      \n",
      " |      1.  x is in the closure of S.\n",
      " |          I.e. Every neighborhood of x contains a point in S.\n",
      " |      2.  x is not in the interior of S.\n",
      " |          I.e. There does not exist an open set centered on x contained\n",
      " |          entirely within S.\n",
      " |      \n",
      " |      There are the points on the outer rim of S.  If S is open then these\n",
      " |      points need not actually be contained within S.\n",
      " |      \n",
      " |      For example, the boundary of an interval is its start and end points.\n",
      " |      This is true regardless of whether or not the interval is open.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Interval\n",
      " |      >>> Interval(0, 1).boundary\n",
      " |      {0, 1}\n",
      " |      >>> Interval(0, 1, True, False).boundary\n",
      " |      {0, 1}\n",
      " |  \n",
      " |  closure\n",
      " |      Property method which returns the closure of a set.\n",
      " |      The closure is defined as the union of the set itself and its\n",
      " |      boundary.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      >>> from sympy import S, Interval\n",
      " |      >>> S.Reals.closure\n",
      " |      Reals\n",
      " |      >>> Interval(0, 1).closure\n",
      " |      Interval(0, 1)\n",
      " |  \n",
      " |  inf\n",
      " |      The infimum of ``self``.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Interval, Union\n",
      " |      >>> Interval(0, 1).inf\n",
      " |      0\n",
      " |      >>> Union(Interval(0, 1), Interval(2, 3)).inf\n",
      " |      0\n",
      " |  \n",
      " |  interior\n",
      " |      Property method which returns the interior of a set.\n",
      " |      The interior of a set S consists all points of S that do not\n",
      " |      belong to the boundary of S.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      >>> from sympy import Interval\n",
      " |      >>> Interval(0, 1).interior\n",
      " |      Interval.open(0, 1)\n",
      " |      >>> Interval(0, 1).boundary.interior\n",
      " |      EmptySet\n",
      " |  \n",
      " |  is_EmptySet\n",
      " |  \n",
      " |  is_closed\n",
      " |      A property method to check whether a set is closed.\n",
      " |      \n",
      " |      Explanation\n",
      " |      ===========\n",
      " |      \n",
      " |      A set is closed if its complement is an open set. The closedness of a\n",
      " |      subset of the reals is determined with respect to R and its standard\n",
      " |      topology.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      >>> from sympy import Interval\n",
      " |      >>> Interval(0, 1).is_closed\n",
      " |      True\n",
      " |  \n",
      " |  is_open\n",
      " |      Property method to check whether a set is open.\n",
      " |      \n",
      " |      Explanation\n",
      " |      ===========\n",
      " |      \n",
      " |      A set is open if and only if it has an empty intersection with its\n",
      " |      boundary. In particular, a subset A of the reals is open if and only\n",
      " |      if each one of its points is contained in an open interval that is a\n",
      " |      subset of A.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      >>> from sympy import S\n",
      " |      >>> S.Reals.is_open\n",
      " |      True\n",
      " |      >>> S.Rationals.is_open\n",
      " |      False\n",
      " |  \n",
      " |  kind\n",
      " |      The kind of a Set\n",
      " |      \n",
      " |      Explanation\n",
      " |      ===========\n",
      " |      \n",
      " |      Any :class:`Set` will have kind :class:`SetKind` which is\n",
      " |      parametrised by the kind of the elements of the set. For example\n",
      " |      most sets are sets of numbers and will have kind\n",
      " |      ``SetKind(NumberKind)``. If elements of sets are different in kind than\n",
      " |      their kind will ``SetKind(UndefinedKind)``. See\n",
      " |      :class:`sympy.core.kind.Kind` for an explanation of the kind system.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Interval, Matrix, FiniteSet, EmptySet, ProductSet, PowerSet\n",
      " |      \n",
      " |      >>> FiniteSet(Matrix([1, 2])).kind\n",
      " |      SetKind(MatrixKind(NumberKind))\n",
      " |      \n",
      " |      >>> Interval(1, 2).kind\n",
      " |      SetKind(NumberKind)\n",
      " |      \n",
      " |      >>> EmptySet.kind\n",
      " |      SetKind()\n",
      " |      \n",
      " |      A :class:`sympy.sets.powerset.PowerSet` is a set of sets:\n",
      " |      \n",
      " |      >>> PowerSet({1, 2, 3}).kind\n",
      " |      SetKind(SetKind(NumberKind))\n",
      " |      \n",
      " |      A :class:`ProductSet` represents the set of tuples of elements of\n",
      " |      other sets. Its kind is :class:`sympy.core.containers.TupleKind`\n",
      " |      parametrised by the kinds of the elements of those sets:\n",
      " |      \n",
      " |      >>> p = ProductSet(FiniteSet(1, 2), FiniteSet(3, 4))\n",
      " |      >>> list(p)\n",
      " |      [(1, 3), (2, 3), (1, 4), (2, 4)]\n",
      " |      >>> p.kind\n",
      " |      SetKind(TupleKind(NumberKind, NumberKind))\n",
      " |      \n",
      " |      When all elements of the set do not have same kind, the kind\n",
      " |      will be returned as ``SetKind(UndefinedKind)``:\n",
      " |      \n",
      " |      >>> FiniteSet(0, Matrix([1, 2])).kind\n",
      " |      SetKind(UndefinedKind)\n",
      " |      \n",
      " |      The kind of the elements of a set are given by the ``element_kind``\n",
      " |      attribute of ``SetKind``:\n",
      " |      \n",
      " |      >>> Interval(1, 2).kind.element_kind\n",
      " |      NumberKind\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      NumberKind\n",
      " |      sympy.core.kind.UndefinedKind\n",
      " |      sympy.core.containers.TupleKind\n",
      " |      MatrixKind\n",
      " |      sympy.matrices.expressions.sets.MatrixSet\n",
      " |      sympy.sets.conditionset.ConditionSet\n",
      " |      Rationals\n",
      " |      Naturals\n",
      " |      Integers\n",
      " |      sympy.sets.fancysets.ImageSet\n",
      " |      sympy.sets.fancysets.Range\n",
      " |      sympy.sets.fancysets.ComplexRegion\n",
      " |      sympy.sets.powerset.PowerSet\n",
      " |      sympy.sets.sets.ProductSet\n",
      " |      sympy.sets.sets.Interval\n",
      " |      sympy.sets.sets.Union\n",
      " |      sympy.sets.sets.Intersection\n",
      " |      sympy.sets.sets.Complement\n",
      " |      sympy.sets.sets.EmptySet\n",
      " |      sympy.sets.sets.UniversalSet\n",
      " |      sympy.sets.sets.FiniteSet\n",
      " |      sympy.sets.sets.SymmetricDifference\n",
      " |      sympy.sets.sets.DisjointUnion\n",
      " |  \n",
      " |  measure\n",
      " |      The (Lebesgue) measure of ``self``.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Interval, Union\n",
      " |      >>> Interval(0, 1).measure\n",
      " |      1\n",
      " |      >>> Union(Interval(0, 1), Interval(2, 3)).measure\n",
      " |      2\n",
      " |  \n",
      " |  sup\n",
      " |      The supremum of ``self``.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Interval, Union\n",
      " |      >>> Interval(0, 1).sup\n",
      " |      1\n",
      " |      >>> Union(Interval(0, 1), Interval(2, 3)).sup\n",
      " |      3\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Data and other attributes inherited from sympy.sets.sets.Set:\n",
      " |  \n",
      " |  __annotations__ = {'is_Complement': typing.Optional[bool], 'is_Interse...\n",
      " |  \n",
      " |  is_Complement = None\n",
      " |  \n",
      " |  is_ComplexRegion = False\n",
      " |  \n",
      " |  is_FiniteSet = False\n",
      " |  \n",
      " |  is_Intersection = None\n",
      " |  \n",
      " |  is_Interval = False\n",
      " |  \n",
      " |  is_ProductSet = False\n",
      " |  \n",
      " |  is_Union = False\n",
      " |  \n",
      " |  is_UniversalSet = None\n",
      " |  \n",
      " |  is_empty = None\n",
      " |  \n",
      " |  is_finite_set = None\n",
      " |  \n",
      " |  is_interval = False\n",
      " |  \n",
      " |  is_iterable = False\n",
      " |  \n",
      " |  is_number = False\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Methods inherited from sympy.core.basic.Basic:\n",
      " |  \n",
      " |  __eq__(self, other)\n",
      " |      Return a boolean indicating whether a == b on the basis of\n",
      " |      their symbolic trees.\n",
      " |      \n",
      " |      This is the same as a.compare(b) == 0 but faster.\n",
      " |      \n",
      " |      Notes\n",
      " |      =====\n",
      " |      \n",
      " |      If a class that overrides __eq__() needs to retain the\n",
      " |      implementation of __hash__() from a parent class, the\n",
      " |      interpreter must be told this explicitly by setting\n",
      " |      __hash__ : Callable[[object], int] = <ParentClass>.__hash__.\n",
      " |      Otherwise the inheritance of __hash__() will be blocked,\n",
      " |      just as if __hash__ had been explicitly set to None.\n",
      " |      \n",
      " |      References\n",
      " |      ==========\n",
      " |      \n",
      " |      from https://docs.python.org/dev/reference/datamodel.html#object.__hash__\n",
      " |  \n",
      " |  __getnewargs__(self)\n",
      " |  \n",
      " |  __getstate__(self)\n",
      " |  \n",
      " |  __hash__(self) -> 'int'\n",
      " |      Return hash(self).\n",
      " |  \n",
      " |  __ne__(self, other)\n",
      " |      ``a != b``  -> Compare two symbolic trees and see whether they are different\n",
      " |      \n",
      " |      this is the same as:\n",
      " |      \n",
      " |      ``a.compare(b) != 0``\n",
      " |      \n",
      " |      but faster\n",
      " |  \n",
      " |  __reduce_ex__(self, protocol)\n",
      " |      Helper for pickle.\n",
      " |  \n",
      " |  __setstate__(self, state)\n",
      " |  \n",
      " |  as_content_primitive(self, radical=False, clear=True)\n",
      " |      A stub to allow Basic args (like Tuple) to be skipped when computing\n",
      " |      the content and primitive components of an expression.\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      sympy.core.expr.Expr.as_content_primitive\n",
      " |  \n",
      " |  as_dummy(self)\n",
      " |      Return the expression with any objects having structurally\n",
      " |      bound symbols replaced with unique, canonical symbols within\n",
      " |      the object in which they appear and having only the default\n",
      " |      assumption for commutativity being True. When applied to a\n",
      " |      symbol a new symbol having only the same commutativity will be\n",
      " |      returned.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Integral, Symbol\n",
      " |      >>> from sympy.abc import x\n",
      " |      >>> r = Symbol('r', real=True)\n",
      " |      >>> Integral(r, (r, x)).as_dummy()\n",
      " |      Integral(_0, (_0, x))\n",
      " |      >>> _.variables[0].is_real is None\n",
      " |      True\n",
      " |      >>> r.as_dummy()\n",
      " |      _r\n",
      " |      \n",
      " |      Notes\n",
      " |      =====\n",
      " |      \n",
      " |      Any object that has structurally bound variables should have\n",
      " |      a property, `bound_symbols` that returns those symbols\n",
      " |      appearing in the object.\n",
      " |  \n",
      " |  atoms(self, *types)\n",
      " |      Returns the atoms that form the current object.\n",
      " |      \n",
      " |      By default, only objects that are truly atomic and cannot\n",
      " |      be divided into smaller pieces are returned: symbols, numbers,\n",
      " |      and number symbols like I and pi. It is possible to request\n",
      " |      atoms of any type, however, as demonstrated below.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import I, pi, sin\n",
      " |      >>> from sympy.abc import x, y\n",
      " |      >>> (1 + x + 2*sin(y + I*pi)).atoms()\n",
      " |      {1, 2, I, pi, x, y}\n",
      " |      \n",
      " |      If one or more types are given, the results will contain only\n",
      " |      those types of atoms.\n",
      " |      \n",
      " |      >>> from sympy import Number, NumberSymbol, Symbol\n",
      " |      >>> (1 + x + 2*sin(y + I*pi)).atoms(Symbol)\n",
      " |      {x, y}\n",
      " |      \n",
      " |      >>> (1 + x + 2*sin(y + I*pi)).atoms(Number)\n",
      " |      {1, 2}\n",
      " |      \n",
      " |      >>> (1 + x + 2*sin(y + I*pi)).atoms(Number, NumberSymbol)\n",
      " |      {1, 2, pi}\n",
      " |      \n",
      " |      >>> (1 + x + 2*sin(y + I*pi)).atoms(Number, NumberSymbol, I)\n",
      " |      {1, 2, I, pi}\n",
      " |      \n",
      " |      Note that I (imaginary unit) and zoo (complex infinity) are special\n",
      " |      types of number symbols and are not part of the NumberSymbol class.\n",
      " |      \n",
      " |      The type can be given implicitly, too:\n",
      " |      \n",
      " |      >>> (1 + x + 2*sin(y + I*pi)).atoms(x) # x is a Symbol\n",
      " |      {x, y}\n",
      " |      \n",
      " |      Be careful to check your assumptions when using the implicit option\n",
      " |      since ``S(1).is_Integer = True`` but ``type(S(1))`` is ``One``, a special type\n",
      " |      of SymPy atom, while ``type(S(2))`` is type ``Integer`` and will find all\n",
      " |      integers in an expression:\n",
      " |      \n",
      " |      >>> from sympy import S\n",
      " |      >>> (1 + x + 2*sin(y + I*pi)).atoms(S(1))\n",
      " |      {1}\n",
      " |      \n",
      " |      >>> (1 + x + 2*sin(y + I*pi)).atoms(S(2))\n",
      " |      {1, 2}\n",
      " |      \n",
      " |      Finally, arguments to atoms() can select more than atomic atoms: any\n",
      " |      SymPy type (loaded in core/__init__.py) can be listed as an argument\n",
      " |      and those types of \"atoms\" as found in scanning the arguments of the\n",
      " |      expression recursively:\n",
      " |      \n",
      " |      >>> from sympy import Function, Mul\n",
      " |      >>> from sympy.core.function import AppliedUndef\n",
      " |      >>> f = Function('f')\n",
      " |      >>> (1 + f(x) + 2*sin(y + I*pi)).atoms(Function)\n",
      " |      {f(x), sin(y + I*pi)}\n",
      " |      >>> (1 + f(x) + 2*sin(y + I*pi)).atoms(AppliedUndef)\n",
      " |      {f(x)}\n",
      " |      \n",
      " |      >>> (1 + x + 2*sin(y + I*pi)).atoms(Mul)\n",
      " |      {I*pi, 2*sin(y + I*pi)}\n",
      " |  \n",
      " |  compare(self, other)\n",
      " |      Return -1, 0, 1 if the object is smaller, equal, or greater than other.\n",
      " |      \n",
      " |      Not in the mathematical sense. If the object is of a different type\n",
      " |      from the \"other\" then their classes are ordered according to\n",
      " |      the sorted_classes list.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy.abc import x, y\n",
      " |      >>> x.compare(y)\n",
      " |      -1\n",
      " |      >>> x.compare(x)\n",
      " |      0\n",
      " |      >>> y.compare(x)\n",
      " |      1\n",
      " |  \n",
      " |  copy(self)\n",
      " |  \n",
      " |  could_extract_minus_sign(self)\n",
      " |  \n",
      " |  count(self, query)\n",
      " |      Count the number of matching subexpressions.\n",
      " |  \n",
      " |  count_ops(self, visual=None)\n",
      " |      Wrapper for count_ops that returns the operation count.\n",
      " |  \n",
      " |  doit(self, **hints)\n",
      " |      Evaluate objects that are not evaluated by default like limits,\n",
      " |      integrals, sums and products. All objects of this kind will be\n",
      " |      evaluated recursively, unless some species were excluded via 'hints'\n",
      " |      or unless the 'deep' hint was set to 'False'.\n",
      " |      \n",
      " |      >>> from sympy import Integral\n",
      " |      >>> from sympy.abc import x\n",
      " |      \n",
      " |      >>> 2*Integral(x, x)\n",
      " |      2*Integral(x, x)\n",
      " |      \n",
      " |      >>> (2*Integral(x, x)).doit()\n",
      " |      x**2\n",
      " |      \n",
      " |      >>> (2*Integral(x, x)).doit(deep=False)\n",
      " |      2*Integral(x, x)\n",
      " |  \n",
      " |  dummy_eq(self, other, symbol=None)\n",
      " |      Compare two expressions and handle dummy symbols.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Dummy\n",
      " |      >>> from sympy.abc import x, y\n",
      " |      \n",
      " |      >>> u = Dummy('u')\n",
      " |      \n",
      " |      >>> (u**2 + 1).dummy_eq(x**2 + 1)\n",
      " |      True\n",
      " |      >>> (u**2 + 1) == (x**2 + 1)\n",
      " |      False\n",
      " |      \n",
      " |      >>> (u**2 + y).dummy_eq(x**2 + y, x)\n",
      " |      True\n",
      " |      >>> (u**2 + y).dummy_eq(x**2 + y, y)\n",
      " |      False\n",
      " |  \n",
      " |  find(self, query, group=False)\n",
      " |      Find all subexpressions matching a query.\n",
      " |  \n",
      " |  has(self, *patterns)\n",
      " |      Test whether any subexpression matches any of the patterns.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import sin\n",
      " |      >>> from sympy.abc import x, y, z\n",
      " |      >>> (x**2 + sin(x*y)).has(z)\n",
      " |      False\n",
      " |      >>> (x**2 + sin(x*y)).has(x, y, z)\n",
      " |      True\n",
      " |      >>> x.has(x)\n",
      " |      True\n",
      " |      \n",
      " |      Note ``has`` is a structural algorithm with no knowledge of\n",
      " |      mathematics. Consider the following half-open interval:\n",
      " |      \n",
      " |      >>> from sympy import Interval\n",
      " |      >>> i = Interval.Lopen(0, 5); i\n",
      " |      Interval.Lopen(0, 5)\n",
      " |      >>> i.args\n",
      " |      (0, 5, True, False)\n",
      " |      >>> i.has(4)  # there is no \"4\" in the arguments\n",
      " |      False\n",
      " |      >>> i.has(0)  # there *is* a \"0\" in the arguments\n",
      " |      True\n",
      " |      \n",
      " |      Instead, use ``contains`` to determine whether a number is in the\n",
      " |      interval or not:\n",
      " |      \n",
      " |      >>> i.contains(4)\n",
      " |      True\n",
      " |      >>> i.contains(0)\n",
      " |      False\n",
      " |      \n",
      " |      \n",
      " |      Note that ``expr.has(*patterns)`` is exactly equivalent to\n",
      " |      ``any(expr.has(p) for p in patterns)``. In particular, ``False`` is\n",
      " |      returned when the list of patterns is empty.\n",
      " |      \n",
      " |      >>> x.has()\n",
      " |      False\n",
      " |  \n",
      " |  has_free(self, *patterns)\n",
      " |      Return True if self has object(s) ``x`` as a free expression\n",
      " |      else False.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Integral, Function\n",
      " |      >>> from sympy.abc import x, y\n",
      " |      >>> f = Function('f')\n",
      " |      >>> g = Function('g')\n",
      " |      >>> expr = Integral(f(x), (f(x), 1, g(y)))\n",
      " |      >>> expr.free_symbols\n",
      " |      {y}\n",
      " |      >>> expr.has_free(g(y))\n",
      " |      True\n",
      " |      >>> expr.has_free(*(x, f(x)))\n",
      " |      False\n",
      " |      \n",
      " |      This works for subexpressions and types, too:\n",
      " |      \n",
      " |      >>> expr.has_free(g)\n",
      " |      True\n",
      " |      >>> (x + y + 1).has_free(y + 1)\n",
      " |      True\n",
      " |  \n",
      " |  has_xfree(self, s: 'set[Basic]')\n",
      " |      Return True if self has any of the patterns in s as a\n",
      " |      free argument, else False. This is like `Basic.has_free`\n",
      " |      but this will only report exact argument matches.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Function\n",
      " |      >>> from sympy.abc import x, y\n",
      " |      >>> f = Function('f')\n",
      " |      >>> f(x).has_xfree({f})\n",
      " |      False\n",
      " |      >>> f(x).has_xfree({f(x)})\n",
      " |      True\n",
      " |      >>> f(x + 1).has_xfree({x})\n",
      " |      True\n",
      " |      >>> f(x + 1).has_xfree({x + 1})\n",
      " |      True\n",
      " |      >>> f(x + y + 1).has_xfree({x + 1})\n",
      " |      False\n",
      " |  \n",
      " |  is_hypergeometric(self, k)\n",
      " |  \n",
      " |  match(self, pattern, old=False)\n",
      " |      Pattern matching.\n",
      " |      \n",
      " |      Wild symbols match all.\n",
      " |      \n",
      " |      Return ``None`` when expression (self) does not match\n",
      " |      with pattern. Otherwise return a dictionary such that::\n",
      " |      \n",
      " |        pattern.xreplace(self.match(pattern)) == self\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Wild, Sum\n",
      " |      >>> from sympy.abc import x, y\n",
      " |      >>> p = Wild(\"p\")\n",
      " |      >>> q = Wild(\"q\")\n",
      " |      >>> r = Wild(\"r\")\n",
      " |      >>> e = (x+y)**(x+y)\n",
      " |      >>> e.match(p**p)\n",
      " |      {p_: x + y}\n",
      " |      >>> e.match(p**q)\n",
      " |      {p_: x + y, q_: x + y}\n",
      " |      >>> e = (2*x)**2\n",
      " |      >>> e.match(p*q**r)\n",
      " |      {p_: 4, q_: x, r_: 2}\n",
      " |      >>> (p*q**r).xreplace(e.match(p*q**r))\n",
      " |      4*x**2\n",
      " |      \n",
      " |      Structurally bound symbols are ignored during matching:\n",
      " |      \n",
      " |      >>> Sum(x, (x, 1, 2)).match(Sum(y, (y, 1, p)))\n",
      " |      {p_: 2}\n",
      " |      \n",
      " |      But they can be identified if desired:\n",
      " |      \n",
      " |      >>> Sum(x, (x, 1, 2)).match(Sum(q, (q, 1, p)))\n",
      " |      {p_: 2, q_: x}\n",
      " |      \n",
      " |      The ``old`` flag will give the old-style pattern matching where\n",
      " |      expressions and patterns are essentially solved to give the\n",
      " |      match. Both of the following give None unless ``old=True``:\n",
      " |      \n",
      " |      >>> (x - 2).match(p - x, old=True)\n",
      " |      {p_: 2*x - 2}\n",
      " |      >>> (2/x).match(p*x, old=True)\n",
      " |      {p_: 2/x**2}\n",
      " |  \n",
      " |  matches(self, expr, repl_dict=None, old=False)\n",
      " |      Helper method for match() that looks for a match between Wild symbols\n",
      " |      in self and expressions in expr.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import symbols, Wild, Basic\n",
      " |      >>> a, b, c = symbols('a b c')\n",
      " |      >>> x = Wild('x')\n",
      " |      >>> Basic(a + x, x).matches(Basic(a + b, c)) is None\n",
      " |      True\n",
      " |      >>> Basic(a + x, x).matches(Basic(a + b + c, b + c))\n",
      " |      {x_: b + c}\n",
      " |  \n",
      " |  rcall(self, *args)\n",
      " |      Apply on the argument recursively through the expression tree.\n",
      " |      \n",
      " |      This method is used to simulate a common abuse of notation for\n",
      " |      operators. For instance, in SymPy the following will not work:\n",
      " |      \n",
      " |      ``(x+Lambda(y, 2*y))(z) == x+2*z``,\n",
      " |      \n",
      " |      however, you can use:\n",
      " |      \n",
      " |      >>> from sympy import Lambda\n",
      " |      >>> from sympy.abc import x, y, z\n",
      " |      >>> (x + Lambda(y, 2*y)).rcall(z)\n",
      " |      x + 2*z\n",
      " |  \n",
      " |  refine(self, assumption=True)\n",
      " |      See the refine function in sympy.assumptions\n",
      " |  \n",
      " |  replace(self, query, value, map=False, simultaneous=True, exact=None)\n",
      " |      Replace matching subexpressions of ``self`` with ``value``.\n",
      " |      \n",
      " |      If ``map = True`` then also return the mapping {old: new} where ``old``\n",
      " |      was a sub-expression found with query and ``new`` is the replacement\n",
      " |      value for it. If the expression itself does not match the query, then\n",
      " |      the returned value will be ``self.xreplace(map)`` otherwise it should\n",
      " |      be ``self.subs(ordered(map.items()))``.\n",
      " |      \n",
      " |      Traverses an expression tree and performs replacement of matching\n",
      " |      subexpressions from the bottom to the top of the tree. The default\n",
      " |      approach is to do the replacement in a simultaneous fashion so\n",
      " |      changes made are targeted only once. If this is not desired or causes\n",
      " |      problems, ``simultaneous`` can be set to False.\n",
      " |      \n",
      " |      In addition, if an expression containing more than one Wild symbol\n",
      " |      is being used to match subexpressions and the ``exact`` flag is None\n",
      " |      it will be set to True so the match will only succeed if all non-zero\n",
      " |      values are received for each Wild that appears in the match pattern.\n",
      " |      Setting this to False accepts a match of 0; while setting it True\n",
      " |      accepts all matches that have a 0 in them. See example below for\n",
      " |      cautions.\n",
      " |      \n",
      " |      The list of possible combinations of queries and replacement values\n",
      " |      is listed below:\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      Initial setup\n",
      " |      \n",
      " |      >>> from sympy import log, sin, cos, tan, Wild, Mul, Add\n",
      " |      >>> from sympy.abc import x, y\n",
      " |      >>> f = log(sin(x)) + tan(sin(x**2))\n",
      " |      \n",
      " |      1.1. type -> type\n",
      " |          obj.replace(type, newtype)\n",
      " |      \n",
      " |          When object of type ``type`` is found, replace it with the\n",
      " |          result of passing its argument(s) to ``newtype``.\n",
      " |      \n",
      " |          >>> f.replace(sin, cos)\n",
      " |          log(cos(x)) + tan(cos(x**2))\n",
      " |          >>> sin(x).replace(sin, cos, map=True)\n",
      " |          (cos(x), {sin(x): cos(x)})\n",
      " |          >>> (x*y).replace(Mul, Add)\n",
      " |          x + y\n",
      " |      \n",
      " |      1.2. type -> func\n",
      " |          obj.replace(type, func)\n",
      " |      \n",
      " |          When object of type ``type`` is found, apply ``func`` to its\n",
      " |          argument(s). ``func`` must be written to handle the number\n",
      " |          of arguments of ``type``.\n",
      " |      \n",
      " |          >>> f.replace(sin, lambda arg: sin(2*arg))\n",
      " |          log(sin(2*x)) + tan(sin(2*x**2))\n",
      " |          >>> (x*y).replace(Mul, lambda *args: sin(2*Mul(*args)))\n",
      " |          sin(2*x*y)\n",
      " |      \n",
      " |      2.1. pattern -> expr\n",
      " |          obj.replace(pattern(wild), expr(wild))\n",
      " |      \n",
      " |          Replace subexpressions matching ``pattern`` with the expression\n",
      " |          written in terms of the Wild symbols in ``pattern``.\n",
      " |      \n",
      " |          >>> a, b = map(Wild, 'ab')\n",
      " |          >>> f.replace(sin(a), tan(a))\n",
      " |          log(tan(x)) + tan(tan(x**2))\n",
      " |          >>> f.replace(sin(a), tan(a/2))\n",
      " |          log(tan(x/2)) + tan(tan(x**2/2))\n",
      " |          >>> f.replace(sin(a), a)\n",
      " |          log(x) + tan(x**2)\n",
      " |          >>> (x*y).replace(a*x, a)\n",
      " |          y\n",
      " |      \n",
      " |          Matching is exact by default when more than one Wild symbol\n",
      " |          is used: matching fails unless the match gives non-zero\n",
      " |          values for all Wild symbols:\n",
      " |      \n",
      " |          >>> (2*x + y).replace(a*x + b, b - a)\n",
      " |          y - 2\n",
      " |          >>> (2*x).replace(a*x + b, b - a)\n",
      " |          2*x\n",
      " |      \n",
      " |          When set to False, the results may be non-intuitive:\n",
      " |      \n",
      " |          >>> (2*x).replace(a*x + b, b - a, exact=False)\n",
      " |          2/x\n",
      " |      \n",
      " |      2.2. pattern -> func\n",
      " |          obj.replace(pattern(wild), lambda wild: expr(wild))\n",
      " |      \n",
      " |          All behavior is the same as in 2.1 but now a function in terms of\n",
      " |          pattern variables is used rather than an expression:\n",
      " |      \n",
      " |          >>> f.replace(sin(a), lambda a: sin(2*a))\n",
      " |          log(sin(2*x)) + tan(sin(2*x**2))\n",
      " |      \n",
      " |      3.1. func -> func\n",
      " |          obj.replace(filter, func)\n",
      " |      \n",
      " |          Replace subexpression ``e`` with ``func(e)`` if ``filter(e)``\n",
      " |          is True.\n",
      " |      \n",
      " |          >>> g = 2*sin(x**3)\n",
      " |          >>> g.replace(lambda expr: expr.is_Number, lambda expr: expr**2)\n",
      " |          4*sin(x**9)\n",
      " |      \n",
      " |      The expression itself is also targeted by the query but is done in\n",
      " |      such a fashion that changes are not made twice.\n",
      " |      \n",
      " |          >>> e = x*(x*y + 1)\n",
      " |          >>> e.replace(lambda x: x.is_Mul, lambda x: 2*x)\n",
      " |          2*x*(2*x*y + 1)\n",
      " |      \n",
      " |      When matching a single symbol, `exact` will default to True, but\n",
      " |      this may or may not be the behavior that is desired:\n",
      " |      \n",
      " |      Here, we want `exact=False`:\n",
      " |      \n",
      " |      >>> from sympy import Function\n",
      " |      >>> f = Function('f')\n",
      " |      >>> e = f(1) + f(0)\n",
      " |      >>> q = f(a), lambda a: f(a + 1)\n",
      " |      >>> e.replace(*q, exact=False)\n",
      " |      f(1) + f(2)\n",
      " |      >>> e.replace(*q, exact=True)\n",
      " |      f(0) + f(2)\n",
      " |      \n",
      " |      But here, the nature of matching makes selecting\n",
      " |      the right setting tricky:\n",
      " |      \n",
      " |      >>> e = x**(1 + y)\n",
      " |      >>> (x**(1 + y)).replace(x**(1 + a), lambda a: x**-a, exact=False)\n",
      " |      x\n",
      " |      >>> (x**(1 + y)).replace(x**(1 + a), lambda a: x**-a, exact=True)\n",
      " |      x**(-x - y + 1)\n",
      " |      >>> (x**y).replace(x**(1 + a), lambda a: x**-a, exact=False)\n",
      " |      x\n",
      " |      >>> (x**y).replace(x**(1 + a), lambda a: x**-a, exact=True)\n",
      " |      x**(1 - y)\n",
      " |      \n",
      " |      It is probably better to use a different form of the query\n",
      " |      that describes the target expression more precisely:\n",
      " |      \n",
      " |      >>> (1 + x**(1 + y)).replace(\n",
      " |      ... lambda x: x.is_Pow and x.exp.is_Add and x.exp.args[0] == 1,\n",
      " |      ... lambda x: x.base**(1 - (x.exp - 1)))\n",
      " |      ...\n",
      " |      x**(1 - y) + 1\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      subs: substitution of subexpressions as defined by the objects\n",
      " |            themselves.\n",
      " |      xreplace: exact node replacement in expr tree; also capable of\n",
      " |                using matching rules\n",
      " |  \n",
      " |  rewrite(self, *args, deep=True, **hints)\n",
      " |      Rewrite *self* using a defined rule.\n",
      " |      \n",
      " |      Rewriting transforms an expression to another, which is mathematically\n",
      " |      equivalent but structurally different. For example you can rewrite\n",
      " |      trigonometric functions as complex exponentials or combinatorial\n",
      " |      functions as gamma function.\n",
      " |      \n",
      " |      This method takes a *pattern* and a *rule* as positional arguments.\n",
      " |      *pattern* is optional parameter which defines the types of expressions\n",
      " |      that will be transformed. If it is not passed, all possible expressions\n",
      " |      will be rewritten. *rule* defines how the expression will be rewritten.\n",
      " |      \n",
      " |      Parameters\n",
      " |      ==========\n",
      " |      \n",
      " |      args : Expr\n",
      " |          A *rule*, or *pattern* and *rule*.\n",
      " |          - *pattern* is a type or an iterable of types.\n",
      " |          - *rule* can be any object.\n",
      " |      \n",
      " |      deep : bool, optional\n",
      " |          If ``True``, subexpressions are recursively transformed. Default is\n",
      " |          ``True``.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      If *pattern* is unspecified, all possible expressions are transformed.\n",
      " |      \n",
      " |      >>> from sympy import cos, sin, exp, I\n",
      " |      >>> from sympy.abc import x\n",
      " |      >>> expr = cos(x) + I*sin(x)\n",
      " |      >>> expr.rewrite(exp)\n",
      " |      exp(I*x)\n",
      " |      \n",
      " |      Pattern can be a type or an iterable of types.\n",
      " |      \n",
      " |      >>> expr.rewrite(sin, exp)\n",
      " |      exp(I*x)/2 + cos(x) - exp(-I*x)/2\n",
      " |      >>> expr.rewrite([cos,], exp)\n",
      " |      exp(I*x)/2 + I*sin(x) + exp(-I*x)/2\n",
      " |      >>> expr.rewrite([cos, sin], exp)\n",
      " |      exp(I*x)\n",
      " |      \n",
      " |      Rewriting behavior can be implemented by defining ``_eval_rewrite()``\n",
      " |      method.\n",
      " |      \n",
      " |      >>> from sympy import Expr, sqrt, pi\n",
      " |      >>> class MySin(Expr):\n",
      " |      ...     def _eval_rewrite(self, rule, args, **hints):\n",
      " |      ...         x, = args\n",
      " |      ...         if rule == cos:\n",
      " |      ...             return cos(pi/2 - x, evaluate=False)\n",
      " |      ...         if rule == sqrt:\n",
      " |      ...             return sqrt(1 - cos(x)**2)\n",
      " |      >>> MySin(MySin(x)).rewrite(cos)\n",
      " |      cos(-cos(-x + pi/2) + pi/2)\n",
      " |      >>> MySin(x).rewrite(sqrt)\n",
      " |      sqrt(1 - cos(x)**2)\n",
      " |      \n",
      " |      Defining ``_eval_rewrite_as_[...]()`` method is supported for backwards\n",
      " |      compatibility reason. This may be removed in the future and using it is\n",
      " |      discouraged.\n",
      " |      \n",
      " |      >>> class MySin(Expr):\n",
      " |      ...     def _eval_rewrite_as_cos(self, *args, **hints):\n",
      " |      ...         x, = args\n",
      " |      ...         return cos(pi/2 - x, evaluate=False)\n",
      " |      >>> MySin(x).rewrite(cos)\n",
      " |      cos(-x + pi/2)\n",
      " |  \n",
      " |  simplify(self, **kwargs)\n",
      " |      See the simplify function in sympy.simplify\n",
      " |  \n",
      " |  sort_key(self, order=None)\n",
      " |      Return a sort key.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import S, I\n",
      " |      \n",
      " |      >>> sorted([S(1)/2, I, -I], key=lambda x: x.sort_key())\n",
      " |      [1/2, -I, I]\n",
      " |      \n",
      " |      >>> S(\"[x, 1/x, 1/x**2, x**2, x**(1/2), x**(1/4), x**(3/2)]\")\n",
      " |      [x, 1/x, x**(-2), x**2, sqrt(x), x**(1/4), x**(3/2)]\n",
      " |      >>> sorted(_, key=lambda x: x.sort_key())\n",
      " |      [x**(-2), 1/x, x**(1/4), sqrt(x), x, x**(3/2), x**2]\n",
      " |  \n",
      " |  subs(self, *args, **kwargs)\n",
      " |      Substitutes old for new in an expression after sympifying args.\n",
      " |      \n",
      " |      `args` is either:\n",
      " |        - two arguments, e.g. foo.subs(old, new)\n",
      " |        - one iterable argument, e.g. foo.subs(iterable). The iterable may be\n",
      " |           o an iterable container with (old, new) pairs. In this case the\n",
      " |             replacements are processed in the order given with successive\n",
      " |             patterns possibly affecting replacements already made.\n",
      " |           o a dict or set whose key/value items correspond to old/new pairs.\n",
      " |             In this case the old/new pairs will be sorted by op count and in\n",
      " |             case of a tie, by number of args and the default_sort_key. The\n",
      " |             resulting sorted list is then processed as an iterable container\n",
      " |             (see previous).\n",
      " |      \n",
      " |      If the keyword ``simultaneous`` is True, the subexpressions will not be\n",
      " |      evaluated until all the substitutions have been made.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import pi, exp, limit, oo\n",
      " |      >>> from sympy.abc import x, y\n",
      " |      >>> (1 + x*y).subs(x, pi)\n",
      " |      pi*y + 1\n",
      " |      >>> (1 + x*y).subs({x:pi, y:2})\n",
      " |      1 + 2*pi\n",
      " |      >>> (1 + x*y).subs([(x, pi), (y, 2)])\n",
      " |      1 + 2*pi\n",
      " |      >>> reps = [(y, x**2), (x, 2)]\n",
      " |      >>> (x + y).subs(reps)\n",
      " |      6\n",
      " |      >>> (x + y).subs(reversed(reps))\n",
      " |      x**2 + 2\n",
      " |      \n",
      " |      >>> (x**2 + x**4).subs(x**2, y)\n",
      " |      y**2 + y\n",
      " |      \n",
      " |      To replace only the x**2 but not the x**4, use xreplace:\n",
      " |      \n",
      " |      >>> (x**2 + x**4).xreplace({x**2: y})\n",
      " |      x**4 + y\n",
      " |      \n",
      " |      To delay evaluation until all substitutions have been made,\n",
      " |      set the keyword ``simultaneous`` to True:\n",
      " |      \n",
      " |      >>> (x/y).subs([(x, 0), (y, 0)])\n",
      " |      0\n",
      " |      >>> (x/y).subs([(x, 0), (y, 0)], simultaneous=True)\n",
      " |      nan\n",
      " |      \n",
      " |      This has the added feature of not allowing subsequent substitutions\n",
      " |      to affect those already made:\n",
      " |      \n",
      " |      >>> ((x + y)/y).subs({x + y: y, y: x + y})\n",
      " |      1\n",
      " |      >>> ((x + y)/y).subs({x + y: y, y: x + y}, simultaneous=True)\n",
      " |      y/(x + y)\n",
      " |      \n",
      " |      In order to obtain a canonical result, unordered iterables are\n",
      " |      sorted by count_op length, number of arguments and by the\n",
      " |      default_sort_key to break any ties. All other iterables are left\n",
      " |      unsorted.\n",
      " |      \n",
      " |      >>> from sympy import sqrt, sin, cos\n",
      " |      >>> from sympy.abc import a, b, c, d, e\n",
      " |      \n",
      " |      >>> A = (sqrt(sin(2*x)), a)\n",
      " |      >>> B = (sin(2*x), b)\n",
      " |      >>> C = (cos(2*x), c)\n",
      " |      >>> D = (x, d)\n",
      " |      >>> E = (exp(x), e)\n",
      " |      \n",
      " |      >>> expr = sqrt(sin(2*x))*sin(exp(x)*x)*cos(2*x) + sin(2*x)\n",
      " |      \n",
      " |      >>> expr.subs(dict([A, B, C, D, E]))\n",
      " |      a*c*sin(d*e) + b\n",
      " |      \n",
      " |      The resulting expression represents a literal replacement of the\n",
      " |      old arguments with the new arguments. This may not reflect the\n",
      " |      limiting behavior of the expression:\n",
      " |      \n",
      " |      >>> (x**3 - 3*x).subs({x: oo})\n",
      " |      nan\n",
      " |      \n",
      " |      >>> limit(x**3 - 3*x, x, oo)\n",
      " |      oo\n",
      " |      \n",
      " |      If the substitution will be followed by numerical\n",
      " |      evaluation, it is better to pass the substitution to\n",
      " |      evalf as\n",
      " |      \n",
      " |      >>> (1/x).evalf(subs={x: 3.0}, n=21)\n",
      " |      0.333333333333333333333\n",
      " |      \n",
      " |      rather than\n",
      " |      \n",
      " |      >>> (1/x).subs({x: 3.0}).evalf(21)\n",
      " |      0.333333333333333314830\n",
      " |      \n",
      " |      as the former will ensure that the desired level of precision is\n",
      " |      obtained.\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      replace: replacement capable of doing wildcard-like matching,\n",
      " |               parsing of match, and conditional replacements\n",
      " |      xreplace: exact node replacement in expr tree; also capable of\n",
      " |                using matching rules\n",
      " |      sympy.core.evalf.EvalfMixin.evalf: calculates the given formula to a desired level of precision\n",
      " |  \n",
      " |  xreplace(self, rule)\n",
      " |      Replace occurrences of objects within the expression.\n",
      " |      \n",
      " |      Parameters\n",
      " |      ==========\n",
      " |      \n",
      " |      rule : dict-like\n",
      " |          Expresses a replacement rule\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      xreplace : the result of the replacement\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import symbols, pi, exp\n",
      " |      >>> x, y, z = symbols('x y z')\n",
      " |      >>> (1 + x*y).xreplace({x: pi})\n",
      " |      pi*y + 1\n",
      " |      >>> (1 + x*y).xreplace({x: pi, y: 2})\n",
      " |      1 + 2*pi\n",
      " |      \n",
      " |      Replacements occur only if an entire node in the expression tree is\n",
      " |      matched:\n",
      " |      \n",
      " |      >>> (x*y + z).xreplace({x*y: pi})\n",
      " |      z + pi\n",
      " |      >>> (x*y*z).xreplace({x*y: pi})\n",
      " |      x*y*z\n",
      " |      >>> (2*x).xreplace({2*x: y, x: z})\n",
      " |      y\n",
      " |      >>> (2*2*x).xreplace({2*x: y, x: z})\n",
      " |      4*z\n",
      " |      >>> (x + y + 2).xreplace({x + y: 2})\n",
      " |      x + y + 2\n",
      " |      >>> (x + 2 + exp(x + 2)).xreplace({x + 2: y})\n",
      " |      x + exp(y) + 2\n",
      " |      \n",
      " |      xreplace does not differentiate between free and bound symbols. In the\n",
      " |      following, subs(x, y) would not change x since it is a bound symbol,\n",
      " |      but xreplace does:\n",
      " |      \n",
      " |      >>> from sympy import Integral\n",
      " |      >>> Integral(x, (x, 1, 2*x)).xreplace({x: y})\n",
      " |      Integral(y, (y, 1, 2*y))\n",
      " |      \n",
      " |      Trying to replace x with an expression raises an error:\n",
      " |      \n",
      " |      >>> Integral(x, (x, 1, 2*x)).xreplace({x: 2*y}) # doctest: +SKIP\n",
      " |      ValueError: Invalid limits given: ((2*y, 1, 4*y),)\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      replace: replacement capable of doing wildcard-like matching,\n",
      " |               parsing of match, and conditional replacements\n",
      " |      subs: substitution of subexpressions as defined by the objects\n",
      " |            themselves.\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Class methods inherited from sympy.core.basic.Basic:\n",
      " |  \n",
      " |  __init_subclass__() from builtins.type\n",
      " |      This method is called when a class is subclassed.\n",
      " |      \n",
      " |      The default implementation does nothing. It may be\n",
      " |      overridden to extend subclasses.\n",
      " |  \n",
      " |  class_key() from builtins.type\n",
      " |      Nice order of classes.\n",
      " |  \n",
      " |  fromiter(args, **assumptions) from builtins.type\n",
      " |      Create a new object from an iterable.\n",
      " |      \n",
      " |      This is a convenience function that allows one to create objects from\n",
      " |      any iterable, without having to convert to a list or tuple first.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Tuple\n",
      " |      >>> Tuple.fromiter(i for i in range(5))\n",
      " |      (0, 1, 2, 3, 4)\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Readonly properties inherited from sympy.core.basic.Basic:\n",
      " |  \n",
      " |  __sympy__\n",
      " |  \n",
      " |  args\n",
      " |      Returns a tuple of arguments of 'self'.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import cot\n",
      " |      >>> from sympy.abc import x, y\n",
      " |      \n",
      " |      >>> cot(x).args\n",
      " |      (x,)\n",
      " |      \n",
      " |      >>> cot(x).args[0]\n",
      " |      x\n",
      " |      \n",
      " |      >>> (x*y).args\n",
      " |      (x, y)\n",
      " |      \n",
      " |      >>> (x*y).args[1]\n",
      " |      y\n",
      " |      \n",
      " |      Notes\n",
      " |      =====\n",
      " |      \n",
      " |      Never use self._args, always use self.args.\n",
      " |      Only use _args in __new__ when creating a new function.\n",
      " |      Do not override .args() from Basic (so that it is easy to\n",
      " |      change the interface in the future if needed).\n",
      " |  \n",
      " |  assumptions0\n",
      " |      Return object `type` assumptions.\n",
      " |      \n",
      " |      For example:\n",
      " |      \n",
      " |        Symbol('x', real=True)\n",
      " |        Symbol('x', integer=True)\n",
      " |      \n",
      " |      are different objects. In other words, besides Python type (Symbol in\n",
      " |      this case), the initial assumptions are also forming their typeinfo.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Symbol\n",
      " |      >>> from sympy.abc import x\n",
      " |      >>> x.assumptions0\n",
      " |      {'commutative': True}\n",
      " |      >>> x = Symbol(\"x\", positive=True)\n",
      " |      >>> x.assumptions0\n",
      " |      {'commutative': True, 'complex': True, 'extended_negative': False,\n",
      " |       'extended_nonnegative': True, 'extended_nonpositive': False,\n",
      " |       'extended_nonzero': True, 'extended_positive': True, 'extended_real':\n",
      " |       True, 'finite': True, 'hermitian': True, 'imaginary': False,\n",
      " |       'infinite': False, 'negative': False, 'nonnegative': True,\n",
      " |       'nonpositive': False, 'nonzero': True, 'positive': True, 'real':\n",
      " |       True, 'zero': False}\n",
      " |  \n",
      " |  canonical_variables\n",
      " |      Return a dictionary mapping any variable defined in\n",
      " |      ``self.bound_symbols`` to Symbols that do not clash\n",
      " |      with any free symbols in the expression.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Lambda\n",
      " |      >>> from sympy.abc import x\n",
      " |      >>> Lambda(x, 2*x).canonical_variables\n",
      " |      {x: _0}\n",
      " |  \n",
      " |  expr_free_symbols\n",
      " |  \n",
      " |  func\n",
      " |      The top-level function in an expression.\n",
      " |      \n",
      " |      The following should hold for all objects::\n",
      " |      \n",
      " |          >> x == x.func(*x.args)\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy.abc import x\n",
      " |      >>> a = 2*x\n",
      " |      >>> a.func\n",
      " |      <class 'sympy.core.mul.Mul'>\n",
      " |      >>> a.args\n",
      " |      (2, x)\n",
      " |      >>> a.func(*a.args)\n",
      " |      2*x\n",
      " |      >>> a == a.func(*a.args)\n",
      " |      True\n",
      " |  \n",
      " |  is_algebraic\n",
      " |  \n",
      " |  is_antihermitian\n",
      " |  \n",
      " |  is_commutative\n",
      " |  \n",
      " |  is_comparable\n",
      " |      Return True if self can be computed to a real number\n",
      " |      (or already is a real number) with precision, else False.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import exp_polar, pi, I\n",
      " |      >>> (I*exp_polar(I*pi/2)).is_comparable\n",
      " |      True\n",
      " |      >>> (I*exp_polar(I*pi*2)).is_comparable\n",
      " |      False\n",
      " |      \n",
      " |      A False result does not mean that `self` cannot be rewritten\n",
      " |      into a form that would be comparable. For example, the\n",
      " |      difference computed below is zero but without simplification\n",
      " |      it does not evaluate to a zero with precision:\n",
      " |      \n",
      " |      >>> e = 2**pi*(1 + 2**pi)\n",
      " |      >>> dif = e - e.expand()\n",
      " |      >>> dif.is_comparable\n",
      " |      False\n",
      " |      >>> dif.n(2)._prec\n",
      " |      1\n",
      " |  \n",
      " |  is_complex\n",
      " |  \n",
      " |  is_composite\n",
      " |  \n",
      " |  is_even\n",
      " |  \n",
      " |  is_extended_negative\n",
      " |  \n",
      " |  is_extended_nonnegative\n",
      " |  \n",
      " |  is_extended_nonpositive\n",
      " |  \n",
      " |  is_extended_nonzero\n",
      " |  \n",
      " |  is_extended_positive\n",
      " |  \n",
      " |  is_extended_real\n",
      " |  \n",
      " |  is_finite\n",
      " |  \n",
      " |  is_hermitian\n",
      " |  \n",
      " |  is_imaginary\n",
      " |  \n",
      " |  is_infinite\n",
      " |  \n",
      " |  is_integer\n",
      " |  \n",
      " |  is_irrational\n",
      " |  \n",
      " |  is_negative\n",
      " |  \n",
      " |  is_noninteger\n",
      " |  \n",
      " |  is_nonnegative\n",
      " |  \n",
      " |  is_nonpositive\n",
      " |  \n",
      " |  is_nonzero\n",
      " |  \n",
      " |  is_odd\n",
      " |  \n",
      " |  is_polar\n",
      " |  \n",
      " |  is_positive\n",
      " |  \n",
      " |  is_prime\n",
      " |  \n",
      " |  is_rational\n",
      " |  \n",
      " |  is_real\n",
      " |  \n",
      " |  is_transcendental\n",
      " |  \n",
      " |  is_zero\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Data and other attributes inherited from sympy.core.basic.Basic:\n",
      " |  \n",
      " |  is_Add = False\n",
      " |  \n",
      " |  is_AlgebraicNumber = False\n",
      " |  \n",
      " |  is_Atom = False\n",
      " |  \n",
      " |  is_Boolean = False\n",
      " |  \n",
      " |  is_Derivative = False\n",
      " |  \n",
      " |  is_Dummy = False\n",
      " |  \n",
      " |  is_Equality = False\n",
      " |  \n",
      " |  is_Float = False\n",
      " |  \n",
      " |  is_Function = False\n",
      " |  \n",
      " |  is_Indexed = False\n",
      " |  \n",
      " |  is_Integer = False\n",
      " |  \n",
      " |  is_MatAdd = False\n",
      " |  \n",
      " |  is_MatMul = False\n",
      " |  \n",
      " |  is_Matrix = False\n",
      " |  \n",
      " |  is_Mul = False\n",
      " |  \n",
      " |  is_Not = False\n",
      " |  \n",
      " |  is_Number = False\n",
      " |  \n",
      " |  is_NumberSymbol = False\n",
      " |  \n",
      " |  is_Order = False\n",
      " |  \n",
      " |  is_Piecewise = False\n",
      " |  \n",
      " |  is_Point = False\n",
      " |  \n",
      " |  is_Poly = False\n",
      " |  \n",
      " |  is_Pow = False\n",
      " |  \n",
      " |  is_Rational = False\n",
      " |  \n",
      " |  is_Relational = False\n",
      " |  \n",
      " |  is_Symbol = False\n",
      " |  \n",
      " |  is_Vector = False\n",
      " |  \n",
      " |  is_Wild = False\n",
      " |  \n",
      " |  is_symbol = False\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Methods inherited from sympy.printing.defaults.Printable:\n",
      " |  \n",
      " |  __repr__ = __str__(self)\n",
      " |  \n",
      " |  __str__(self)\n",
      " |      Return str(self).\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Methods inherited from sympy.core.evalf.EvalfMixin:\n",
      " |  \n",
      " |  evalf(self, n=15, subs=None, maxn=100, chop=False, strict=False, quad=None, verbose=False)\n",
      " |      Evaluate the given formula to an accuracy of *n* digits.\n",
      " |      \n",
      " |      Parameters\n",
      " |      ==========\n",
      " |      \n",
      " |      subs : dict, optional\n",
      " |          Substitute numerical values for symbols, e.g.\n",
      " |          ``subs={x:3, y:1+pi}``. The substitutions must be given as a\n",
      " |          dictionary.\n",
      " |      \n",
      " |      maxn : int, optional\n",
      " |          Allow a maximum temporary working precision of maxn digits.\n",
      " |      \n",
      " |      chop : bool or number, optional\n",
      " |          Specifies how to replace tiny real or imaginary parts in\n",
      " |          subresults by exact zeros.\n",
      " |      \n",
      " |          When ``True`` the chop value defaults to standard precision.\n",
      " |      \n",
      " |          Otherwise the chop value is used to determine the\n",
      " |          magnitude of \"small\" for purposes of chopping.\n",
      " |      \n",
      " |          >>> from sympy import N\n",
      " |          >>> x = 1e-4\n",
      " |          >>> N(x, chop=True)\n",
      " |          0.000100000000000000\n",
      " |          >>> N(x, chop=1e-5)\n",
      " |          0.000100000000000000\n",
      " |          >>> N(x, chop=1e-4)\n",
      " |          0\n",
      " |      \n",
      " |      strict : bool, optional\n",
      " |          Raise ``PrecisionExhausted`` if any subresult fails to\n",
      " |          evaluate to full accuracy, given the available maxprec.\n",
      " |      \n",
      " |      quad : str, optional\n",
      " |          Choose algorithm for numerical quadrature. By default,\n",
      " |          tanh-sinh quadrature is used. For oscillatory\n",
      " |          integrals on an infinite interval, try ``quad='osc'``.\n",
      " |      \n",
      " |      verbose : bool, optional\n",
      " |          Print debug information.\n",
      " |      \n",
      " |      Notes\n",
      " |      =====\n",
      " |      \n",
      " |      When Floats are naively substituted into an expression,\n",
      " |      precision errors may adversely affect the result. For example,\n",
      " |      adding 1e16 (a Float) to 1 will truncate to 1e16; if 1e16 is\n",
      " |      then subtracted, the result will be 0.\n",
      " |      That is exactly what happens in the following:\n",
      " |      \n",
      " |      >>> from sympy.abc import x, y, z\n",
      " |      >>> values = {x: 1e16, y: 1, z: 1e16}\n",
      " |      >>> (x + y - z).subs(values)\n",
      " |      0\n",
      " |      \n",
      " |      Using the subs argument for evalf is the accurate way to\n",
      " |      evaluate such an expression:\n",
      " |      \n",
      " |      >>> (x + y - z).evalf(subs=values)\n",
      " |      1.00000000000000\n",
      " |  \n",
      " |  n = evalf(self, n=15, subs=None, maxn=100, chop=False, strict=False, quad=None, verbose=False)\n",
      "\n"
     ]
    }
   ],
   "source": [
    "help(ConditionSet)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 153,
   "id": "437b2b01",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 153,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "7 in An"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 154,
   "id": "b90c2c48",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "False"
      ]
     },
     "execution_count": 154,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "0 in An"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 155,
   "id": "69ede8a7",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 155,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "3 in An"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 156,
   "id": "e99b0cff",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 156,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "5 in An"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 157,
   "id": "676c449a",
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Help on function summation in module sympy.concrete.summations:\n",
      "\n",
      "summation(f, *symbols, **kwargs)\n",
      "    Compute the summation of f with respect to symbols.\n",
      "    \n",
      "    Explanation\n",
      "    ===========\n",
      "    \n",
      "    The notation for symbols is similar to the notation used in Integral.\n",
      "    summation(f, (i, a, b)) computes the sum of f with respect to i from a to b,\n",
      "    i.e.,\n",
      "    \n",
      "    ::\n",
      "    \n",
      "                                    b\n",
      "                                  ____\n",
      "                                  \\   `\n",
      "        summation(f, (i, a, b)) =  )    f\n",
      "                                  /___,\n",
      "                                  i = a\n",
      "    \n",
      "    If it cannot compute the sum, it returns an unevaluated Sum object.\n",
      "    Repeated sums can be computed by introducing additional symbols tuples::\n",
      "    \n",
      "    Examples\n",
      "    ========\n",
      "    \n",
      "    >>> from sympy import summation, oo, symbols, log\n",
      "    >>> i, n, m = symbols('i n m', integer=True)\n",
      "    \n",
      "    >>> summation(2*i - 1, (i, 1, n))\n",
      "    n**2\n",
      "    >>> summation(1/2**i, (i, 0, oo))\n",
      "    2\n",
      "    >>> summation(1/log(n)**n, (n, 2, oo))\n",
      "    Sum(log(n)**(-n), (n, 2, oo))\n",
      "    >>> summation(i, (i, 0, n), (n, 0, m))\n",
      "    m**3/6 + m**2/2 + m/3\n",
      "    \n",
      "    >>> from sympy.abc import x\n",
      "    >>> from sympy import factorial\n",
      "    >>> summation(x**n/factorial(n), (n, 0, oo))\n",
      "    exp(x)\n",
      "    \n",
      "    See Also\n",
      "    ========\n",
      "    \n",
      "    Sum\n",
      "    Product, sympy.concrete.products.product\n",
      "\n"
     ]
    }
   ],
   "source": [
    "help(summation)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 158,
   "id": "7d3e1fe4",
   "metadata": {},
   "outputs": [],
   "source": [
    "expr = (n+2)*(6/S(7))**n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 159,
   "id": "7d9f0aee",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left(\\frac{7}{6}\\right)^{- n} \\left(n + 2\\right)$"
      ],
      "text/plain": [
       "(n + 2)/(7/6)**n"
      ]
     },
     "execution_count": 159,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "expr"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 160,
   "id": "82b35f2c",
   "metadata": {},
   "outputs": [],
   "source": [
    "a_n=[expr.subs(n,i) for i in range(1,20)]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 161,
   "id": "902179a1",
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[18/7,\n",
       " 144/49,\n",
       " 1080/343,\n",
       " 7776/2401,\n",
       " 7776/2401,\n",
       " 373248/117649,\n",
       " 2519424/823543,\n",
       " 16796160/5764801,\n",
       " 110854656/40353607,\n",
       " 725594112/282475249,\n",
       " 4716361728/1977326743,\n",
       " 4353564672/1977326743,\n",
       " 195910410240/96889010407,\n",
       " 1253826625536/678223072849,\n",
       " 7993144737792/4747561509943,\n",
       " 50779978334208/33232930569601,\n",
       " 321606529449984/232630513987207,\n",
       " 2031199133368320/1628413597910449,\n",
       " 1828079220031488/1628413597910449]"
      ]
     },
     "execution_count": 161,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a_n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 163,
   "id": "a3bf9cb1",
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAnYAAAHWCAYAAAD6oMSKAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAABSCklEQVR4nO3dd3hUZcLG4edMeiAJBEij90iHJEDAjoKoCIKCjW5BQVR0V1B39Vt3V13XsoqCIF3FRhE7uFJEShJIQg8goRMSWnqf8/2BZEUDBEhypvzu65przcyZyTNnDzNPTnlfwzRNUwAAAHB6NqsDAAAAoHJQ7AAAAFwExQ4AAMBFUOwAAABcBMUOAADARVDsAAAAXATFDgAAwEVQ7AAAAFwExQ6AyzNNU1lZWWI8dgCujmIHwOVlZ2crKChI2dnZVkcBgCpFsQMAAHARFDsAAAAXQbEDAABwERQ7AAAAF0GxAwAAcBEUOwAAABdBsQMAAHARFDsAAAAXQbEDAABwERQ7AAAAF0GxAwAAcBEUOwAAABdBsQMAAHARFDsAAAAXQbEDAABwERQ7AAAAF0GxAwAAcBEUOwAAABfhaXUAOI6iErtSj+Vqd3qOMvOLVVRSquJSU0WldhX/eisqsau41JQkhQX5KjzIV/Vr+Sm8lp9CA3zk6cHfCgAAWIVi54aKS+3ak5GrnUeztSs9R7uOZmvn0WztPZ6nUrt5ya9rM6SQAF9F1PJVeC0/Na1TQ9FNaiuqcW0F+HpV4jsAAADlodi5ifyiUq3alaHvtqTph+1HlV1QUu5yAT6eahFaUyEBPvLysMnbwyYvD5u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Sv369VNERIQMw9DixYvPetw0Tb3wwguKiIiQn5+frr32Wm3duvWCr7tgwQK1adNGPj4+atOmjRYtWnTR2RzF+dZRcXGxnn76abVv3141atRQRESEhg0bpsOHD5f7Wvd0a6THerWUJD23aJP8W/c4a7sqKCiojrdU6S60HY0YMeIP/4a6d+9+wdd1l+1IUrmfM4Zh6NVXXz3na86ePbvc5zjrdlSR73pn+kyi2J3HypUrNXbsWK1bt07Lli1TSUmJevfurdzcC48NlZKSoiNHjpTdWrZsWQ2JrdG2bduz3uvmzZvPuWxqaqpuvvlmXXXVVUpMTNQzzzyj8ePHa8GCBdWYuPrFx8eftY6WLVsmSbrzzjvP+zxH2Y52796tunXrys/PT926ddNDDz2kKVOmaO3atcrKyrro18vNzVXHjh01efLkch//17/+pddff12TJ09WfHy8wsLCdOONN553asO1a9dqyJAhGjp0qJKTkzV06FANHjxY69evv+h8juB86ygvL08bN27UX/7yF23cuFELFy7Uzp07ddttt53z9R6/oaW6BOXLMGxqcMdz+jZhZ9l25evrW5VvpcpcaDuSpJtuuumsf0PffPPNeV/TnbYjSWetmyNHjmjmzJkyDEODBg067+sGBgb+4bnOuh1V5LveqT6TTFRYenq6KclcuXLlOZdZvny5Kck8efJk9QWz0PPPP2927Nixwsv/+c9/NiMjI8+676GHHjK7d+9eyckc22OPPWY2b97ctNvt5T7uTtuRJHPRokVlP9vtdjMsLMx8+eWXy+4rKCgwg4KCzKlTp57zdQYPHmzedNNNZ93Xp08f86677jIzMzNNSWZmZmal568Ov19H5YmLizMlmfv27TvnMu/PnGVGDP4/s/HTX5ntn//O3HEkq5KTWqe8dTR8+HCzf//+F/U659uOnF1FtqP+/fub119//XmXmTVrlhkUFFR5wRzM77/rq+IzqSqxx+4iZGZmSpKCg4MvuGznzp0VHh6uXr16afny5VUdzVK7du1SRESEmjZtqrvuukt79uw557Jr165V7969z7qvT58+SkhIUHFxcVVHdQhFRUX64IMPNGrUqAteoehO29EZqampSktLO2s78fHx0TXXXKM1a9ac83nn2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o1SyEhIbrlllsu+rnush01bdpUYWFhZ20nRUVFWrlypXr06HHO551r2zrfc5zZmVK3a9cu/fDDD5f0h1Gr0JqqkfiBbGaplm07qr98sbVsD7orOn78uA4cOHDef0futh2dMWPGDEVFRaljx44X/VzTNJWUlOS0n08X+q53us+kKr00w8k9/PDDZlBQkLlixQrzyJEjZbe8vLyyZSZOnGgOHTq07Oc33njDXLRokblz505zy5Yt5sSJE01J5oIFC6x4C1XuySefNFesWGHu2bPHXLdunXnrrbeaAQEB5t69e03T/OP62bNnj+nv728+8cQT5rZt28wZM2aYXl5e5ueff27VW6g2paWlZqNGjcynn376D4+5y3b0z3/+04yOjjZr1qxp1q5d27z22mtNSebrr79uJiYmll3R+fLLL5tBQUHmwoULzc2bN5u9evUyPT09TR8fH7Np06bmlClTzKFDh5oTJ04se+2ff/7Z9PDwMF9++WVz+/bt5ssvv2x6enqa69atc8qrYrOzs83ExEQzMTHxD+uouLjYvO2228wGDRqYSUlJZ30+FRYWlr3G79fRCy+8YH733XfmL7/8YiYmJpojR440PT09zbcWrjKbTPzKbPz0V+brS1OseLuX5HzrKDs723zyySfNNWvWmKmpqeby5cvN2NhYs379+mZW1v+uBr6Y7cgZnW8dnZGZmWn6+/ubU6ZMKfc1KrodrV+/vsrfT1WoyHf97z+T7r77bjM8PNwhtyWK3XlIKvc2a9assmWGDx9uXnPNNWU/v/LKK2bz5s1NX19fs3bt2uaVV15pfv3119UfvpoMGTLEDA8PN728vMyIiAhz4MCB5tatW8se//36MU3TXLFihdm5c2fT29vbbNKkyTk/TFzN999/b0oyU1L++MXpLttRnz59zFmzZpkzZ84s99/W8OHDTdM8PbzA888/b4aFhZne3t6mzWYz77vvPnPbtm3m9OnTTS8vL7NNmzZly5/x2Wefma1btza9vLzMyMjIsiLsjMXuzJA35a2j1NTUc34+LV++vOw1rrnmmrPW0eOPP242atTI9Pb2NuvVq2f27t3bXLNmjWmapjlv7V6z8dOny93ctXur+d1emvOto7y8PLN3795mvXr1TC8vL7N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WrVBwXg9prXq6nPH+6hx3q1lIfN0JLkw+rz5iqt/nX8O0dEsQNQrXJzc9WxY0dNnjy5Qsunpqbq5ptv1lVXXaXExEQ988wzGj9+vBYsWFDFSQFA8vKw6YkbW2nBwz3UtG4NpWUV6L4Z6/XCkq0qKC61Ot4fcCgWgGUMw9CiRYs0YMCAcy7z9NNPa8mSJdq+fXvZfWPGjFFycrLWrl1bod/DoVgAlSGvqEQvfbND89btkyRNuLGVxvdqaXGqs7HHDoBDW7t2rXr37n3WfX369FFCQoKKi4vLfU5hYaGysrLOugHA5fL39tSLA9pp1sgYxTaroweuamZ1pD+g2AFwaGlpaQoNDT3rvtDQUJWUlOjYsfLPc3nppZcUFBRUdmvYsGF1RAXgJq5rHaL5D3aXn7fjzU5BsQPg8Azj7MFBz5xB8vv7z5g0aZIyMzPLbgcOHKjyjADgCDytDgAA5xMWFqa0tLSz7ktPT5enp6fq1KlT7nN8fHzk4+NTHfEAwKGwxw6AQ4uNjdWyZcvOum/p0qWKjo6Wl5fjjiUFAFag2AGoVjk5OUpKSlJSUpKk08OZJCUlaf/+05NvT5o0ScOGDStbfsyYMdq3b58mTJig7du3a+bMmZoxY4aeeuopK+IDgEPjUCyAapWQkKDrrruu7OcJEyZIkoYPH67Zs2fryJEjZSVPkpo2bapvvvlGTzzxhN555x1FRETorbfe0qBBg6o9OwA4OsaxA+DyGMcOgLvgUCwAAICLoNgBAAC4CIodAACAi6DYAQAAuAiKHQAAgIug2AEAALgIih0AAICLoNgBAAC4CIodAACAi6DYAQAAuAiKHQAAgIug2AEAALgIih0AAICLMEzTNK0OAQBVyTRNZWdnKyAgQIZhWB0HAKoMxQ4AAMBFcCgWAADARVDsAAAAXATFDgAAwEVQ7AAAAFwExQ4AAMBFUOwAAABcBMUOAADARfw/0M2l1wMk5S0AAAAASUVORK5CYII=",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "<sympy.plotting.plot.Plot at 0x7fd5ccbb3880>"
      ]
     },
     "execution_count": 163,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "plot(expr,(n,1,20))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 165,
   "id": "9da9e532",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\frac{7776}{2401}$"
      ],
      "text/plain": [
       "7776/2401"
      ]
     },
     "execution_count": 165,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "Max(*a_n)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 166,
   "id": "0d677477",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\frac{1828079220031488}{1628413597910449}$"
      ],
      "text/plain": [
       "1828079220031488/1628413597910449"
      ]
     },
     "execution_count": 166,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "Min(*a_n)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 167,
   "id": "1cd9737c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left\\{- \\frac{- 2 \\log{\\left(7 \\right)} + 1 + 2 \\log{\\left(6 \\right)}}{- \\log{\\left(7 \\right)} + \\log{\\left(6 \\right)}}\\right\\}$"
      ],
      "text/plain": [
       "{-(-2*log(7) + 1 + 2*log(6))/(-log(7) + log(6))}"
      ]
     },
     "execution_count": 167,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "solveset(diff(expr,n),n,Reals)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 168,
   "id": "52c21349",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle 4.48715919463088$"
      ],
      "text/plain": [
       "4.48715919463088"
      ]
     },
     "execution_count": 168,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "N(list(_)[0])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 169,
   "id": "884f1446",
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Help on function rsolve in module sympy.solvers.recurr:\n",
      "\n",
      "rsolve(f, y, init=None)\n",
      "    Solve univariate recurrence with rational coefficients.\n",
      "    \n",
      "    Given `k`-th order linear recurrence `\\operatorname{L} y = f`,\n",
      "    or equivalently:\n",
      "    \n",
      "    .. math:: a_{k}(n) y(n+k) + a_{k-1}(n) y(n+k-1) +\n",
      "              \\cdots + a_{0}(n) y(n) = f(n)\n",
      "    \n",
      "    where `a_{i}(n)`, for `i=0, \\ldots, k`, are polynomials or rational\n",
      "    functions in `n`, and `f` is a hypergeometric function or a sum\n",
      "    of a fixed number of pairwise dissimilar hypergeometric terms in\n",
      "    `n`, finds all solutions or returns ``None``, if none were found.\n",
      "    \n",
      "    Initial conditions can be given as a dictionary in two forms:\n",
      "    \n",
      "        (1) ``{  n_0  : v_0,   n_1  : v_1, ...,   n_m  : v_m}``\n",
      "        (2) ``{y(n_0) : v_0, y(n_1) : v_1, ..., y(n_m) : v_m}``\n",
      "    \n",
      "    or as a list ``L`` of values:\n",
      "    \n",
      "        ``L = [v_0, v_1, ..., v_m]``\n",
      "    \n",
      "    where ``L[i] = v_i``, for `i=0, \\ldots, m`, maps to `y(n_i)`.\n",
      "    \n",
      "    Examples\n",
      "    ========\n",
      "    \n",
      "    Lets consider the following recurrence:\n",
      "    \n",
      "    .. math:: (n - 1) y(n + 2) - (n^2 + 3 n - 2) y(n + 1) +\n",
      "              2 n (n + 1) y(n) = 0\n",
      "    \n",
      "    >>> from sympy import Function, rsolve\n",
      "    >>> from sympy.abc import n\n",
      "    >>> y = Function('y')\n",
      "    \n",
      "    >>> f = (n - 1)*y(n + 2) - (n**2 + 3*n - 2)*y(n + 1) + 2*n*(n + 1)*y(n)\n",
      "    \n",
      "    >>> rsolve(f, y(n))\n",
      "    2**n*C0 + C1*factorial(n)\n",
      "    \n",
      "    >>> rsolve(f, y(n), {y(0):0, y(1):3})\n",
      "    3*2**n - 3*factorial(n)\n",
      "    \n",
      "    See Also\n",
      "    ========\n",
      "    \n",
      "    rsolve_poly, rsolve_ratio, rsolve_hyper\n",
      "\n"
     ]
    }
   ],
   "source": [
    "help(rsolve)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 170,
   "id": "51bb8336",
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Help on function rsolve_poly in module sympy.solvers.recurr:\n",
      "\n",
      "rsolve_poly(coeffs, f, n, shift=0, **hints)\n",
      "    Given linear recurrence operator `\\operatorname{L}` of order\n",
      "    `k` with polynomial coefficients and inhomogeneous equation\n",
      "    `\\operatorname{L} y = f`, where `f` is a polynomial, we seek for\n",
      "    all polynomial solutions over field `K` of characteristic zero.\n",
      "    \n",
      "    The algorithm performs two basic steps:\n",
      "    \n",
      "        (1) Compute degree `N` of the general polynomial solution.\n",
      "        (2) Find all polynomials of degree `N` or less\n",
      "            of `\\operatorname{L} y = f`.\n",
      "    \n",
      "    There are two methods for computing the polynomial solutions.\n",
      "    If the degree bound is relatively small, i.e. it's smaller than\n",
      "    or equal to the order of the recurrence, then naive method of\n",
      "    undetermined coefficients is being used. This gives a system\n",
      "    of algebraic equations with `N+1` unknowns.\n",
      "    \n",
      "    In the other case, the algorithm performs transformation of the\n",
      "    initial equation to an equivalent one for which the system of\n",
      "    algebraic equations has only `r` indeterminates. This method is\n",
      "    quite sophisticated (in comparison with the naive one) and was\n",
      "    invented together by Abramov, Bronstein and Petkovsek.\n",
      "    \n",
      "    It is possible to generalize the algorithm implemented here to\n",
      "    the case of linear q-difference and differential equations.\n",
      "    \n",
      "    Lets say that we would like to compute `m`-th Bernoulli polynomial\n",
      "    up to a constant. For this we can use `b(n+1) - b(n) = m n^{m-1}`\n",
      "    recurrence, which has solution `b(n) = B_m + C`. For example:\n",
      "    \n",
      "    >>> from sympy import Symbol, rsolve_poly\n",
      "    >>> n = Symbol('n', integer=True)\n",
      "    \n",
      "    >>> rsolve_poly([-1, 1], 4*n**3, n)\n",
      "    C0 + n**4 - 2*n**3 + n**2\n",
      "    \n",
      "    References\n",
      "    ==========\n",
      "    \n",
      "    .. [1] S. A. Abramov, M. Bronstein and M. Petkovsek, On polynomial\n",
      "           solutions of linear operator equations, in: T. Levelt, ed.,\n",
      "           Proc. ISSAC '95, ACM Press, New York, 1995, 290-296.\n",
      "    \n",
      "    .. [2] M. Petkovsek, Hypergeometric solutions of linear recurrences\n",
      "           with polynomial coefficients, J. Symbolic Computation,\n",
      "           14 (1992), 243-264.\n",
      "    \n",
      "    .. [3] M. Petkovsek, H. S. Wilf, D. Zeilberger, A = B, 1996.\n",
      "\n"
     ]
    }
   ],
   "source": [
    "help(rsolve_poly)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 171,
   "id": "70d0a447",
   "metadata": {},
   "outputs": [],
   "source": [
    "f=Function(\"f\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 177,
   "id": "eed4cdca",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\frac{n \\left(n - 1\\right)}{2} + 1$"
      ],
      "text/plain": [
       "n*(n - 1)/2 + 1"
      ]
     },
     "execution_count": 177,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "rsolve(f(n+1)-f(n)-n,f(n),{f(1):1})"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 178,
   "id": "6101bf95",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\frac{n^{2} - n + 2}{2}$"
      ],
      "text/plain": [
       "(n**2 - n + 2)/2"
      ]
     },
     "execution_count": 178,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "factor(expand(together(_)))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 179,
   "id": "11ffcde6",
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "ename": "ValueError",
     "evalue": "'f(n + k)' expected, got '1/f(n)'",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mValueError\u001b[0m                                Traceback (most recent call last)",
      "Cell \u001b[0;32mIn[179], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[43mrsolve\u001b[49m\u001b[43m(\u001b[49m\u001b[43mf\u001b[49m\u001b[43m(\u001b[49m\u001b[43mn\u001b[49m\u001b[38;5;241;43m+\u001b[39;49m\u001b[38;5;241;43m1\u001b[39;49m\u001b[43m)\u001b[49m\u001b[38;5;241;43m-\u001b[39;49m\u001b[38;5;241;43m1\u001b[39;49m\u001b[38;5;241;43m+\u001b[39;49m\u001b[38;5;241;43m1\u001b[39;49m\u001b[38;5;241;43m/\u001b[39;49m\u001b[43mf\u001b[49m\u001b[43m(\u001b[49m\u001b[43mn\u001b[49m\u001b[43m)\u001b[49m\u001b[43m,\u001b[49m\u001b[43mf\u001b[49m\u001b[43m(\u001b[49m\u001b[43mn\u001b[49m\u001b[43m)\u001b[49m\u001b[43m,\u001b[49m\u001b[43m{\u001b[49m\u001b[43mf\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;241;43m1\u001b[39;49m\u001b[43m)\u001b[49m\u001b[43m:\u001b[49m\u001b[38;5;241;43m2\u001b[39;49m\u001b[43m}\u001b[49m\u001b[43m)\u001b[49m\n",
      "File \u001b[0;32m~/Documents/python学习/sympy/sympy/solvers/recurr.py:753\u001b[0m, in \u001b[0;36mrsolve\u001b[0;34m(f, y, init)\u001b[0m\n\u001b[1;32m    751\u001b[0m                 h_part[\u001b[38;5;28mint\u001b[39m(result[k])]\u001b[38;5;241m.\u001b[39mappend(coeff)\n\u001b[1;32m    752\u001b[0m                 \u001b[38;5;28;01mcontinue\u001b[39;00m\n\u001b[0;32m--> 753\u001b[0m         \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mValueError\u001b[39;00m(\n\u001b[1;32m    754\u001b[0m             \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m(\u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m + k)\u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m expected, got \u001b[39m\u001b[38;5;124m'\u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m'\u001b[39m\u001b[38;5;124m\"\u001b[39m \u001b[38;5;241m%\u001b[39m (y\u001b[38;5;241m.\u001b[39mfunc, n, h))\n\u001b[1;32m    755\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m k \u001b[38;5;129;01min\u001b[39;00m h_part:\n\u001b[1;32m    756\u001b[0m     h_part[k] \u001b[38;5;241m=\u001b[39m Add(\u001b[38;5;241m*\u001b[39mh_part[k])\n",
      "\u001b[0;31mValueError\u001b[0m: 'f(n + k)' expected, got '1/f(n)'"
     ]
    }
   ],
   "source": [
    "rsolve(f(n+1)-1+1/f(n),f(n),{f(1):2})"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 182,
   "id": "bdd1cac7",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left\\{\\frac{1}{2} - \\frac{\\sqrt{3} i}{2}, \\frac{1}{2} + \\frac{\\sqrt{3} i}{2}\\right\\}$"
      ],
      "text/plain": [
       "{1/2 - sqrt(3)*I/2, 1/2 + sqrt(3)*I/2}"
      ]
     },
     "execution_count": 182,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "solveset(x**2-x+1,x,Complexes)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 183,
   "id": "a47f7d81",
   "metadata": {},
   "outputs": [],
   "source": [
    "an=[2]\n",
    "for i in range(1,20):\n",
    "    an.append(1-S(1)/an[i-1])\n",
    "    "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 185,
   "id": "fc6262d5",
   "metadata": {},
   "outputs": [],
   "source": [
    "an=7+6*(n-1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 186,
   "id": "f10e4301",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle 3 m^{2} + 4 m$"
      ],
      "text/plain": [
       "3*m**2 + 4*m"
      ]
     },
     "execution_count": 186,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "summation(an,(n,1,m))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 190,
   "id": "ec4fad21",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left\\{\\frac{1}{2}\\right\\}$"
      ],
      "text/plain": [
       "{1/2}"
      ]
     },
     "execution_count": 190,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "solveset(x*(x-1)+S(42)/168,x,Reals)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 191,
   "id": "0c817a73",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left\\{7 - 2 \\sqrt{10}, 2 \\sqrt{10} + 7\\right\\}$"
      ],
      "text/plain": [
       "{7 - 2*sqrt(10), 2*sqrt(10) + 7}"
      ]
     },
     "execution_count": 191,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "solveset(QuadraticFunction(1,-14,9).equation(x),x,Reals)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 192,
   "id": "436c265d",
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Help on function function_tangent in module function_calculator_package.extreme_points:\n",
      "\n",
      "function_tangent(f, x, x_0=0, coordinate=(x, y))\n",
      "    this function will return the f(function of x)'s tangent equation at x=x_0.\n",
      "    \n",
      "    if you don't point out the the x_0,it will be 0.\n",
      "    if you don't point out the coordinate's symbols, it will be xOy coordinate.\n",
      "\n"
     ]
    }
   ],
   "source": [
    "help(function_tangent)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 193,
   "id": "3541945b",
   "metadata": {},
   "outputs": [],
   "source": [
    "expr=(x+a)*exp(2*x)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 194,
   "id": "29141af1",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left(a + x\\right) e^{2 x}$"
      ],
      "text/plain": [
       "(a + x)*exp(2*x)"
      ]
     },
     "execution_count": 194,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "expr"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 195,
   "id": "bdf22d9a",
   "metadata": {},
   "outputs": [],
   "source": [
    "t=symbols(\"t\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 199,
   "id": "3f262157",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle y = \\left(a + t - \\left(t - x\\right) \\left(2 a + 2 t + 1\\right)\\right) e^{2 t}$"
      ],
      "text/plain": [
       "Eq(y, (a + t - (t - x)*(2*a + 2*t + 1))*exp(2*t))"
      ]
     },
     "execution_count": 199,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "function_tangent(expr,x,t,(x,y))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 200,
   "id": "c549b720",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle 0 = \\left(a - t \\left(2 a + 2 t + 1\\right) + t\\right) e^{2 t}$"
      ],
      "text/plain": [
       "Eq(0, (a - t*(2*a + 2*t + 1) + t)*exp(2*t))"
      ]
     },
     "execution_count": 200,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "_.subs({x:0,y:0})"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 201,
   "id": "a0f41504",
   "metadata": {},
   "outputs": [],
   "source": [
    "check=expand(simplify(_))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 202,
   "id": "fbc1f51b",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle - 2 a t e^{2 t} + a e^{2 t} - 2 t^{2} e^{2 t} = 0$"
      ],
      "text/plain": [
       "Eq(-2*a*t*exp(2*t) + a*exp(2*t) - 2*t**2*exp(2*t), 0)"
      ]
     },
     "execution_count": 202,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "check\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 207,
   "id": "bf54ac51",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle - \\left(2 a t - a + 2 t^{2}\\right) e^{2 t} = 0$"
      ],
      "text/plain": [
       "Eq(-(2*a*t - a + 2*t**2)*exp(2*t), 0)"
      ]
     },
     "execution_count": 207,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "factor(check)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 203,
   "id": "89747b03",
   "metadata": {},
   "outputs": [],
   "source": [
    "answer=list(solveset(check,a))[0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 204,
   "id": "55dfde04",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle - \\frac{2 t^{2}}{2 t - 1}$"
      ],
      "text/plain": [
       "-2*t**2/(2*t - 1)"
      ]
     },
     "execution_count": 204,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "answer"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 205,
   "id": "44ff3143",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle - t - \\frac{1}{2} - \\frac{1}{2 \\cdot \\left(2 t - 1\\right)}$"
      ],
      "text/plain": [
       "-t - 1/2 - 1/(2*(2*t - 1))"
      ]
     },
     "execution_count": 205,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "apart(answer)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 210,
   "id": "005fa9ab",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle y = \\log{\\left(t \\right)} - 1 + \\frac{x}{t}$"
      ],
      "text/plain": [
       "Eq(y, log(t) - 1 + x/t)"
      ]
     },
     "execution_count": 210,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "function_tangent(ln(x),x,t,(x,y))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 211,
   "id": "9d2ca29c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle y = \\log{\\left(t \\right)} - 1$"
      ],
      "text/plain": [
       "Eq(y, log(t) - 1)"
      ]
     },
     "execution_count": 211,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "_.subs(x,0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 212,
   "id": "67f59ce1",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle y = a - t^{2} + 2 t x + 2 x$"
      ],
      "text/plain": [
       "Eq(y, a - t**2 + 2*t*x + 2*x)"
      ]
     },
     "execution_count": 212,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "function_tangent(x**2+2*x+a,x,t)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 214,
   "id": "564fff22",
   "metadata": {},
   "outputs": [],
   "source": [
    "expr=ln(x)-a*x**2/S(2)-2*x"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 215,
   "id": "ad0454b4",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle - \\frac{a x^{2}}{2} - 2 x + \\log{\\left(x \\right)}$"
      ],
      "text/plain": [
       "-a*x**2/2 - 2*x + log(x)"
      ]
     },
     "execution_count": 215,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "expr"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 220,
   "id": "55e57021",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle - a x - 2 + \\frac{1}{x} < 0$"
      ],
      "text/plain": [
       "-a*x - 2 + 1/x < 0"
      ]
     },
     "execution_count": 220,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "diff(expr,x)<0"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 222,
   "id": "a5a5ee2a",
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "ename": "NotImplementedError",
     "evalue": "\nThe inequality, -x*x - 2 + 1/x < 0, cannot be solved using\nsolve_univariate_inequality.",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mValueError\u001b[0m                                Traceback (most recent call last)",
      "File \u001b[0;32m~/Documents/python学习/sympy/sympy/solvers/inequalities.py:521\u001b[0m, in \u001b[0;36msolve_univariate_inequality\u001b[0;34m(expr, gen, relational, domain, continuous)\u001b[0m\n\u001b[1;32m    519\u001b[0m     \u001b[38;5;28;01mif\u001b[39;00m solns \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[1;32m    520\u001b[0m         \u001b[38;5;66;03m# in which case we raise ValueError\u001b[39;00m\n\u001b[0;32m--> 521\u001b[0m         \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mValueError\u001b[39;00m\n\u001b[1;32m    522\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m (\u001b[38;5;167;01mValueError\u001b[39;00m, \u001b[38;5;167;01mNotImplementedError\u001b[39;00m):\n\u001b[1;32m    523\u001b[0m     \u001b[38;5;66;03m# replace gen with generic x since it's\u001b[39;00m\n\u001b[1;32m    524\u001b[0m     \u001b[38;5;66;03m# univariate anyway\u001b[39;00m\n",
      "\u001b[0;31mValueError\u001b[0m: ",
      "\nDuring handling of the above exception, another exception occurred:\n",
      "\u001b[0;31mNotImplementedError\u001b[0m                       Traceback (most recent call last)",
      "Cell \u001b[0;32mIn[222], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[43msolve_univariate_inequality\u001b[49m\u001b[43m(\u001b[49m\u001b[43mdiff\u001b[49m\u001b[43m(\u001b[49m\u001b[43mexpr\u001b[49m\u001b[43m,\u001b[49m\u001b[43mx\u001b[49m\u001b[43m)\u001b[49m\u001b[38;5;241;43m<\u001b[39;49m\u001b[38;5;241;43m0\u001b[39;49m\u001b[43m,\u001b[49m\u001b[43ma\u001b[49m\u001b[43m)\u001b[49m\n",
      "File \u001b[0;32m~/Documents/python学习/sympy/sympy/solvers/inequalities.py:525\u001b[0m, in \u001b[0;36msolve_univariate_inequality\u001b[0;34m(expr, gen, relational, domain, continuous)\u001b[0m\n\u001b[1;32m    521\u001b[0m         \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mValueError\u001b[39;00m\n\u001b[1;32m    522\u001b[0m \u001b[38;5;28;01mexcept\u001b[39;00m (\u001b[38;5;167;01mValueError\u001b[39;00m, \u001b[38;5;167;01mNotImplementedError\u001b[39;00m):\n\u001b[1;32m    523\u001b[0m     \u001b[38;5;66;03m# replace gen with generic x since it's\u001b[39;00m\n\u001b[1;32m    524\u001b[0m     \u001b[38;5;66;03m# univariate anyway\u001b[39;00m\n\u001b[0;32m--> 525\u001b[0m     \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mNotImplementedError\u001b[39;00m(filldedent(\u001b[38;5;124m'''\u001b[39m\n\u001b[1;32m    526\u001b[0m \u001b[38;5;124m        The inequality, \u001b[39m\u001b[38;5;132;01m%s\u001b[39;00m\u001b[38;5;124m, cannot be solved using\u001b[39m\n\u001b[1;32m    527\u001b[0m \u001b[38;5;124m        solve_univariate_inequality.\u001b[39m\n\u001b[1;32m    528\u001b[0m \u001b[38;5;124m        \u001b[39m\u001b[38;5;124m'''\u001b[39m \u001b[38;5;241m%\u001b[39m expr\u001b[38;5;241m.\u001b[39msubs(gen, Symbol(\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mx\u001b[39m\u001b[38;5;124m'\u001b[39m))))\n\u001b[1;32m    530\u001b[0m expanded_e \u001b[38;5;241m=\u001b[39m expand_mul(e)\n\u001b[1;32m    531\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mvalid\u001b[39m(x):\n\u001b[1;32m    532\u001b[0m     \u001b[38;5;66;03m# this is used to see if gen=x satisfies the\u001b[39;00m\n\u001b[1;32m    533\u001b[0m     \u001b[38;5;66;03m# relational by substituting it into the\u001b[39;00m\n\u001b[0;32m   (...)\u001b[0m\n\u001b[1;32m    539\u001b[0m     \u001b[38;5;66;03m#\u001b[39;00m\n\u001b[1;32m    540\u001b[0m     \u001b[38;5;66;03m# expanded_e, expr and gen used from enclosing scope\u001b[39;00m\n",
      "\u001b[0;31mNotImplementedError\u001b[0m: \nThe inequality, -x*x - 2 + 1/x < 0, cannot be solved using\nsolve_univariate_inequality."
     ]
    }
   ],
   "source": [
    "solve_univariate_inequality(diff(expr,x)<0,a)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 223,
   "id": "58c92fc9",
   "metadata": {},
   "outputs": [],
   "source": [
    "expr= a*x+ln(x)+3"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 224,
   "id": "f55feadb",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle a x + \\log{\\left(x \\right)} + 3$"
      ],
      "text/plain": [
       "a*x + log(x) + 3"
      ]
     },
     "execution_count": 224,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "expr"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 225,
   "id": "a2af4d06",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle a + \\frac{1}{x}$"
      ],
      "text/plain": [
       "a + 1/x"
      ]
     },
     "execution_count": 225,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "diff(expr,x)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 226,
   "id": "4b59382e",
   "metadata": {},
   "outputs": [],
   "source": [
    "expr = x**2/2-2*x-(m*x**2-x+1)/exp(x)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 227,
   "id": "ef91f1fe",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\frac{x^{2}}{2} - 2 x - \\left(m x^{2} - x + 1\\right) e^{- x}$"
      ],
      "text/plain": [
       "x**2/2 - 2*x - (m*x**2 - x + 1)*exp(-x)"
      ]
     },
     "execution_count": 227,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "expr"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 240,
   "id": "d3f56809",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle x - \\left(2 m x - 1\\right) e^{- x} + \\left(m x^{2} - x + 1\\right) e^{- x} - 2$"
      ],
      "text/plain": [
       "x - (2*m*x - 1)*exp(-x) + (m*x**2 - x + 1)*exp(-x) - 2"
      ]
     },
     "execution_count": 240,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "diff(expr,x)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 241,
   "id": "6842f8ec",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left(m x^{2} - 2 m x - x + \\left(x - 2\\right) e^{x} + 2\\right) e^{- x}$"
      ],
      "text/plain": [
       "(m*x**2 - 2*m*x - x + (x - 2)*exp(x) + 2)*exp(-x)"
      ]
     },
     "execution_count": 241,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "simplify(_)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 242,
   "id": "d9e4aaca",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left(x - 2\\right) \\left(m x + e^{x} - 1\\right) e^{- x}$"
      ],
      "text/plain": [
       "(x - 2)*(m*x + exp(x) - 1)*exp(-x)"
      ]
     },
     "execution_count": 242,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "factor(_)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 243,
   "id": "7b1cb371",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left\\{2\\right\\} \\cup \\left\\{x\\; \\middle|\\; x \\in \\mathbb{R} \\wedge m x + e^{x} - 1 = 0 \\right\\}$"
      ],
      "text/plain": [
       "Union(ConditionSet(x, Eq(m*x + exp(x) - 1, 0), Reals), {2})"
      ]
     },
     "execution_count": 243,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "solveset(_,x,Reals)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 231,
   "id": "55e7f9c1",
   "metadata": {},
   "outputs": [],
   "source": [
    "expr_check=list(_)[0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 232,
   "id": "4e779163",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle - \\frac{e^{x}}{x} - \\frac{1 - e^{x}}{x^{2}}$"
      ],
      "text/plain": [
       "-exp(x)/x - (1 - exp(x))/x**2"
      ]
     },
     "execution_count": 232,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "diff(expr_check,x)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 233,
   "id": "0c316d5a",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle - \\frac{x e^{x} - e^{x} + 1}{x^{2}}$"
      ],
      "text/plain": [
       "-(x*exp(x) - exp(x) + 1)/x**2"
      ]
     },
     "execution_count": 233,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "factor(_)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 235,
   "id": "65338c70",
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAnYAAA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ya0EVkpZM2AAAAAElFTkSuQmCC",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "<sympy.plotting.plot.Plot at 0x7fd5a13200d0>"
      ]
     },
     "execution_count": 235,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "plot(expr_check,-1,(x,0.5,5))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 244,
   "id": "b54483c7",
   "metadata": {},
   "outputs": [],
   "source": [
    "expr= exp(1-x)+a*ln(x)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 245,
   "id": "e33c40a1",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle a \\log{\\left(x \\right)} + e^{1 - x}$"
      ],
      "text/plain": [
       "a*log(x) + exp(1 - x)"
      ]
     },
     "execution_count": 245,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "expr"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 247,
   "id": "df864682",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\frac{a}{x} - e^{1 - x}$"
      ],
      "text/plain": [
       "a/x - exp(1 - x)"
      ]
     },
     "execution_count": 247,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "diff(expr,x)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 248,
   "id": "ee77545d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left\\{x e^{1 - x}\\right\\}$"
      ],
      "text/plain": [
       "{x*exp(1 - x)}"
      ]
     },
     "execution_count": 248,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "solveset(_,a)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 249,
   "id": "612b7e3e",
   "metadata": {},
   "outputs": [],
   "source": [
    "expr_check=list(_)[0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 250,
   "id": "2ec304ca",
   "metadata": {},
   "outputs": [],
   "source": [
    "expr = -x**2/2+6*x-8*ln(x)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 251,
   "id": "ea7fe5bc",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle - \\frac{x^{2}}{2} + 6 x - 8 \\log{\\left(x \\right)}$"
      ],
      "text/plain": [
       "-x**2/2 + 6*x - 8*log(x)"
      ]
     },
     "execution_count": 251,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "expr"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 252,
   "id": "b991ec4a",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle - x + 6 - \\frac{8}{x}$"
      ],
      "text/plain": [
       "-x + 6 - 8/x"
      ]
     },
     "execution_count": 252,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "diff(expr,x)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 253,
   "id": "ac387e12",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left\\{2, 4\\right\\}$"
      ],
      "text/plain": [
       "{2, 4}"
      ]
     },
     "execution_count": 253,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "solveset(_,x,Reals)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 254,
   "id": "801ea2cc",
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAnYAAAHWCAYAAAD6oMSKAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAABJpklEQVR4nO3deXxU9b3/8fckk0z2CdkXErKwBxAEZMcFhQpFW7eL11bUX7161Vrl0qt4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metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "<sympy.plotting.plot.Plot at 0x7fd5a1634280>"
      ]
     },
     "execution_count": 254,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "plot(expr,(x,0.5,5))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 255,
   "id": "c38d2d8b",
   "metadata": {},
   "outputs": [],
   "source": [
    "a1,b1,b,d=symbols(\"a1,b1,b,d\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 257,
   "id": "487602ed",
   "metadata": {},
   "outputs": [],
   "source": [
    "expr=(a1+d*(n-1))*(b1+b*(n-1))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 260,
   "id": "f64e799c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle - a_{1} b + a_{1} b_{1} + b d n^{2} + b d - b_{1} d + n \\left(a_{1} b - 2 b d + b_{1} d\\right)$"
      ],
      "text/plain": [
       "-a1*b + a1*b1 + b*d*n**2 + b*d - b1*d + n*(a1*b - 2*b*d + b1*d)"
      ]
     },
     "execution_count": 260,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "collect(expand(expr),n)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "fdaf8ace",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2025"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "45**2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "id": "21029006",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{2: 1, 3: 1, 7: 1, 11: 1}"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "factorint(462)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "id": "ca236161",
   "metadata": {},
   "outputs": [],
   "source": [
    "expr=n**2+1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "id": "681c2b01",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle n^{2} + 1$"
      ],
      "text/plain": [
       "n**2 + 1"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "expr"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "id": "a65974dc",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle 2 n - 1$"
      ],
      "text/plain": [
       "2*n - 1"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "simplify(expr-expr.subs(n,n-1))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "id": "27ab212e",
   "metadata": {},
   "outputs": [],
   "source": [
    "expr = Piecewise((x+1/S(2),x<=1/S(2)),(2*x-1,x<1),(x-1,x>=1))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "id": "b6663810",
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAnIAAAHTCAYAAACjhvVDAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/bCgiHAAAACXBIWXMAAA9hAAAPYQGoP6dpAABhaElEQVR4nO3dd1hUZ8IF8DO0oQijKFIEAbtYkCqgmBhjjUZT1GQjRdTEaGIS111j2m7MJq7fpqixRaXGBEuwZaOxJCoWlCJgbxEFEURQZqgDM3O/P1A2WBAQuFPO73nm2eX6Mp653sC5d+68r0QQBAFEREREpHOMxA5ARERERE3DIkdERESko1jkiIiIiHQUixwRERGRjmKRIyIiItJRLHJEREREOopFjoiIiEhHscjVQxAEKBQKcKo9IiIi0kYscvUoKSmBTCZDSUmJ2FGIiIiIHsAiR0RERKSjWO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iIhIR7HIEREREekoFjkiIiIiHcUiR0RERKSjWOSIiIiIdNT/A5h35NqIi9rmAAAAAElFTkSuQmCC",
      "text/plain": [
       "<Figure size 640x480 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/plain": [
       "<sympy.plotting.plot.Plot at 0x7fb860537490>"
      ]
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "plot(expr,(x,0,3))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "id": "0204ea3d",
   "metadata": {},
   "outputs": [],
   "source": [
    "An=[7/S(3)]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "id": "277482f3",
   "metadata": {},
   "outputs": [],
   "source": [
    "for i in range(20):\n",
    "    An.append(expr.subs(x,An[-1]))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "id": "a73d2319",
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[7/3,\n",
       " 4/3,\n",
       " 1/3,\n",
       " 5/6,\n",
       " 2/3,\n",
       " 1/3,\n",
       " 5/6,\n",
       " 2/3,\n",
       " 1/3,\n",
       " 5/6,\n",
       " 2/3,\n",
       " 1/3,\n",
       " 5/6,\n",
       " 2/3,\n",
       " 1/3,\n",
       " 5/6,\n",
       " 2/3,\n",
       " 1/3,\n",
       " 5/6,\n",
       " 2/3,\n",
       " 1/3]"
      ]
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "An"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "id": "1292d755",
   "metadata": {},
   "outputs": [],
   "source": [
    "expr=x**(n+1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "id": "bd5b919c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle x^{n + 1}$"
      ],
      "text/plain": [
       "x**(n + 1)"
      ]
     },
     "execution_count": 32,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "expr"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "id": "f6a43555",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle y = n x - n + x$"
      ],
      "text/plain": [
       "Eq(y, n*x - n + x)"
      ]
     },
     "execution_count": 35,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "function_tangent(expr,x,1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "id": "dee96182",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left\\{\\frac{n}{n + 1}\\right\\}$"
      ],
      "text/plain": [
       "{n/(n + 1)}"
      ]
     },
     "execution_count": 36,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "solveset(_.subs(y,0),x)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "id": "1b83b318",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\log{\\left(2024 \\right)}$"
      ],
      "text/plain": [
       "log(2024)"
      ]
     },
     "execution_count": 46,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "expand_log(log(2024))\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "id": "aeb2f219",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left\\{-1, 2\\right\\}$"
      ],
      "text/plain": [
       "{-1, 2}"
      ]
     },
     "execution_count": 47,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "\n",
    "solveset(2*x-2-4/x,x)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 49,
   "id": "7abc7389",
   "metadata": {},
   "outputs": [],
   "source": [
    "f=Function(\"f\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 50,
   "id": "27e00182",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle 3^{n} C_{0} - 1$"
      ],
      "text/plain": [
       "3**n*C0 - 1"
      ]
     },
     "execution_count": 50,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "rsolve(f(n+1)-3*f(n)-2,f(n))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "id": "77156533",
   "metadata": {},
   "outputs": [],
   "source": [
    "from sympy.abc import delta"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 53,
   "id": "073664f2",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\delta$"
      ],
      "text/plain": [
       "delta"
      ]
     },
     "execution_count": 53,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "delta"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 54,
   "id": "ffcb750d",
   "metadata": {},
   "outputs": [],
   "source": [
    "expr=2*ln(x)+x**2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 55,
   "id": "2d479085",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle y = 4 x - 3$"
      ],
      "text/plain": [
       "Eq(y, 4*x - 3)"
      ]
     },
     "execution_count": 55,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "function_tangent(expr,x,1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 58,
   "id": "c61ba66b",
   "metadata": {},
   "outputs": [],
   "source": [
    "a,b,c = symbols(\"a,b,c\",positive =True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 59,
   "id": "98f3a58b",
   "metadata": {},
   "outputs": [],
   "source": [
    "expr=a**2*(1-(y/b)**2)+(y-b)**2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 60,
   "id": "f602bb11",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle a^{2} \\cdot \\left(1 - \\frac{y^{2}}{b^{2}}\\right) + \\left(- b + y\\right)^{2}$"
      ],
      "text/plain": [
       "a**2*(1 - y**2/b**2) + (-b + y)**2"
      ]
     },
     "execution_count": 60,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "expr"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 61,
   "id": "a37fe8fd",
   "metadata": {},
   "outputs": [],
   "source": [
    "q=QuadraticFunction(expr,x=y)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 63,
   "id": "bce3173f",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle a^{2} + b^{2} - 2 b y + y^{2} \\left(- \\frac{a^{2}}{b^{2}} + 1\\right)$"
      ],
      "text/plain": [
       "a**2 + b**2 - 2*b*y + y**2*(-a**2/b**2 + 1)"
      ]
     },
     "execution_count": 63,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "q.equation(y)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 73,
   "id": "13a28be0",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle 2 b^{2} - 2 b y + c^{2} - \\frac{c^{2} y^{2}}{b^{2}}$"
      ],
      "text/plain": [
       "2*b**2 - 2*b*y + c**2 - c**2*y**2/b**2"
      ]
     },
     "execution_count": 73,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "simplify(q.symmetry_equation(y).subs(a**2,b**2+c**2))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 74,
   "id": "1f2a0569",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\frac{b^{4}}{c^{2}} + 2 b^{2} + c^{2} - \\frac{c^{2} \\left(\\frac{b^{3}}{c^{2}} + y\\right)^{2}}{b^{2}}$"
      ],
      "text/plain": [
       "b**4/c**2 + 2*b**2 + c**2 - c**2*(b**3/c**2 + y)**2/b**2"
      ]
     },
     "execution_count": 74,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "QuadraticFunction(_,x=y).symmetry_equation(y)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 75,
   "id": "d49ba17f",
   "metadata": {},
   "outputs": [],
   "source": [
    "expr = x**(2/S(3))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 76,
   "id": "e2ad0f44",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle x^{\\frac{2}{3}}$"
      ],
      "text/plain": [
       "x**(2/3)"
      ]
     },
     "execution_count": 76,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "expr"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 78,
   "id": "8b70297f",
   "metadata": {},
   "outputs": [],
   "source": [
    "leq=function_tangent(expr,x,1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 81,
   "id": "149c31f8",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle y = \\frac{2 x}{3} + \\frac{1}{3}$"
      ],
      "text/plain": [
       "Eq(y, 2*x/3 + 1/3)"
      ]
     },
     "execution_count": 81,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "leq"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 85,
   "id": "8de8e92c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle - \\frac{2 x}{3} + y - \\frac{1}{3} = 0$"
      ],
      "text/plain": [
       "Eq(-2*x/3 + y - 1/3, 0)"
      ]
     },
     "execution_count": 85,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "to_side(leq)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 80,
   "id": "2c6b6fb8",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left\\{- \\frac{1}{2}\\right\\}$"
      ],
      "text/plain": [
       "{-1/2}"
      ]
     },
     "execution_count": 80,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "solveset(leq.subs(y,0),x)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 82,
   "id": "4f3c4c71",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left\\{\\frac{5}{3}\\right\\}$"
      ],
      "text/plain": [
       "{5/3}"
      ]
     },
     "execution_count": 82,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "solveset(leq.subs(x,2),y)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "id": "6732a87a",
   "metadata": {},
   "outputs": [],
   "source": [
    "A=solveset(exp(x)>2,x,Reals)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "id": "d94701e3",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left(\\log{\\left(2 \\right)}, \\infty\\right)$"
      ],
      "text/plain": [
       "Interval.open(log(2), oo)"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "id": "3a428972",
   "metadata": {},
   "outputs": [],
   "source": [
    "B=solveset(sqrt(x)<9,x,Reals)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "id": "6269850c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left[0, 81\\right)$"
      ],
      "text/plain": [
       "Interval.Ropen(0, 81)"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "B"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "id": "969d5ea4",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left(\\log{\\left(2 \\right)}, 81\\right)$"
      ],
      "text/plain": [
       "Interval.open(log(2), 81)"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "Intersection(A,B)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "id": "4602d8e9",
   "metadata": {},
   "outputs": [],
   "source": [
    "z = symbols(\"z\",complex=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "id": "bc238a1b",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "z in Complexes"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 366,
   "id": "79f5d617",
   "metadata": {},
   "outputs": [],
   "source": [
    "expr=(z+conjugate(z))/(z-conjugate(z))-I"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 367,
   "id": "146ea159",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle - i + \\frac{z + \\overline{z}}{z - \\overline{z}}$"
      ],
      "text/plain": [
       "-I + (z + conjugate(z))/(z - conjugate(z))"
      ]
     },
     "execution_count": 367,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "expr"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "id": "f945f7ea",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle - \\frac{i x}{y  } - i$"
      ],
      "text/plain": [
       "-I*x/y   - I"
      ]
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "expr.subs({z:x+y*I,conjugate(z):x-y*I})"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "id": "b403a0b2",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left\\{z\\; \\middle|\\; z \\in \\mathbb{C} \\wedge z - i \\left(z - \\overline{z}\\right) + \\overline{z} = 0 \\right\\} \\setminus \\left\\{z\\; \\middle|\\; z \\in \\mathbb{C} \\wedge z - \\overline{z} = 0 \\right\\}$"
      ],
      "text/plain": [
       "Complement(ConditionSet(z, Eq(z - I*(z - conjugate(z)) + conjugate(z), 0), Complexes), ConditionSet(z, Eq(z - conjugate(z), 0), Complexes))"
      ]
     },
     "execution_count": 29,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "solveset(expr,z,Complexes)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 368,
   "id": "50e2f275",
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left\\{- b + i b\\right\\}$"
      ],
      "text/plain": [
       "{-b + I*b}"
      ]
     },
     "execution_count": 368,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "solve_complex(expr,z)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 89,
   "id": "b6db7595",
   "metadata": {},
   "outputs": [],
   "source": [
    "from sympy.series.sequences import RecursiveSeq"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 92,
   "id": "9644e013",
   "metadata": {},
   "outputs": [],
   "source": [
    "s=Function(\"s\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 107,
   "id": "edcf398e",
   "metadata": {},
   "outputs": [],
   "source": [
    "a,b,q =symbols(\"a,b,q\",real=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 101,
   "id": "f44047a0",
   "metadata": {},
   "outputs": [],
   "source": [
    "n =symbols(\"n\",nature = True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 108,
   "id": "f4ee2765",
   "metadata": {},
   "outputs": [],
   "source": [
    "a=SeqFormula(a*q**(n-1),(n,0,oo))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 111,
   "id": "d439c72f",
   "metadata": {},
   "outputs": [],
   "source": [
    "eq=Eq(2*sum(a[1:4]),7*a[2])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 117,
   "id": "2328d804",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle 2 a q^{2} + 2 a q + 2 a = 7 a q$"
      ],
      "text/plain": [
       "Eq(2*a*q**2 + 2*a*q + 2*a, 7*a*q)"
      ]
     },
     "execution_count": 117,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "eq"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 119,
   "id": "0ecaf66c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left\\{\\frac{1}{2}, 2\\right\\}$"
      ],
      "text/plain": [
       "{1/2, 2}"
      ]
     },
     "execution_count": 119,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "solveset((eq),q)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 125,
   "id": "c28cef7a",
   "metadata": {},
   "outputs": [],
   "source": [
    "answer=simplify(sum(a[1:5])/a[2])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 126,
   "id": "6126d33e",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\frac{\\left(q + 1\\right) \\left(q^{2} + 1\\right)}{q}$"
      ],
      "text/plain": [
       "(q + 1)*(q**2 + 1)/q"
      ]
     },
     "execution_count": 126,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "factor(answer)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 127,
   "id": "e473debc",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\frac{15}{2}$"
      ],
      "text/plain": [
       "15/2"
      ]
     },
     "execution_count": 127,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "answer.subs(q,2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 128,
   "id": "45a837c5",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\frac{15}{4}$"
      ],
      "text/plain": [
       "15/4"
      ]
     },
     "execution_count": 128,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "answer.subs(q,1/S(2))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 131,
   "id": "86c4841e",
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Help on function FiniteRV in module sympy.stats.frv_types:\n",
      "\n",
      "FiniteRV(name, density, **kwargs)\n",
      "    Create a Finite Random Variable given a dict representing the density.\n",
      "    \n",
      "    Parameters\n",
      "    ==========\n",
      "    \n",
      "    name : Symbol\n",
      "        Represents name of the random variable.\n",
      "    density : dict\n",
      "        Dictionary containing the pdf of finite distribution\n",
      "    check : bool\n",
      "        If True, it will check whether the given density\n",
      "        integrates to 1 over the given set. If False, it\n",
      "        will not perform this check. Default is False.\n",
      "    \n",
      "    Examples\n",
      "    ========\n",
      "    \n",
      "    >>> from sympy.stats import FiniteRV, P, E\n",
      "    \n",
      "    >>> density = {0: .1, 1: .2, 2: .3, 3: .4}\n",
      "    >>> X = FiniteRV('X', density)\n",
      "    \n",
      "    >>> E(X)\n",
      "    2.00000000000000\n",
      "    >>> P(X >= 2)\n",
      "    0.700000000000000\n",
      "    \n",
      "    Returns\n",
      "    =======\n",
      "    \n",
      "    RandomSymbol\n",
      "\n"
     ]
    }
   ],
   "source": [
    "help(FiniteRV)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 133,
   "id": "373290e5",
   "metadata": {},
   "outputs": [],
   "source": [
    "p=symbols(\"p\",positive=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 134,
   "id": "b7890f01",
   "metadata": {},
   "outputs": [],
   "source": [
    "X=FiniteRV(\"X\",{1:p,2:1-p})"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 139,
   "id": "d8fc9baa",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left\\{ 1 : p, \\  2 : 1 - p\\right\\}$"
      ],
      "text/plain": [
       "{1: p, 2: 1 - p}"
      ]
     },
     "execution_count": 139,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "density(X).dict"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 140,
   "id": "cca6dd5c",
   "metadata": {},
   "outputs": [],
   "source": [
    "Y=FiniteRV(\"Y\",{1:1-p,2:p})"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 141,
   "id": "58217122",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left\\{ 1 : 1 - p, \\  2 : p\\right\\}$"
      ],
      "text/plain": [
       "{1: 1 - p, 2: p}"
      ]
     },
     "execution_count": 141,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "density(Y).dict"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 145,
   "id": "ea66d984",
   "metadata": {},
   "outputs": [],
   "source": [
    "from sympy.stats import variance, covariance"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 146,
   "id": "fcffd195",
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Help on function covariance in module sympy.stats.rv_interface:\n",
      "\n",
      "covariance(X, Y, condition=None, **kwargs)\n",
      "    Covariance of two random expressions.\n",
      "    \n",
      "    Explanation\n",
      "    ===========\n",
      "    \n",
      "    The expectation that the two variables will rise and fall together\n",
      "    \n",
      "    .. math::\n",
      "        covariance(X,Y) = E((X-E(X)) (Y-E(Y)))\n",
      "    \n",
      "    Examples\n",
      "    ========\n",
      "    \n",
      "    >>> from sympy.stats import Exponential, covariance\n",
      "    >>> from sympy import Symbol\n",
      "    \n",
      "    >>> rate = Symbol('lambda', positive=True, real=True)\n",
      "    >>> X = Exponential('X', rate)\n",
      "    >>> Y = Exponential('Y', rate)\n",
      "    \n",
      "    >>> covariance(X, X)\n",
      "    lambda**(-2)\n",
      "    >>> covariance(X, Y)\n",
      "    0\n",
      "    >>> covariance(X, Y + rate*X)\n",
      "    1/lambda\n",
      "\n"
     ]
    }
   ],
   "source": [
    "help(covariance)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 147,
   "id": "c5678048",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle p \\left(p \\left(1 - p\\right)^{2} + p \\left(1 - p\\right) \\left(p - 1\\right)\\right) + \\left(1 - p\\right) \\left(- p^{2} \\cdot \\left(1 - p\\right) - p^{2} \\left(p - 1\\right)\\right)$"
      ],
      "text/plain": [
       "p*(p*(1 - p)**2 + p*(1 - p)*(p - 1)) + (1 - p)*(-p**2*(1 - p) - p**2*(p - 1))"
      ]
     },
     "execution_count": 147,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "covariance(X,Y)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 148,
   "id": "d89c8996",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle 0$"
      ],
      "text/plain": [
       "0"
      ]
     },
     "execution_count": 148,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "simplify(_)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 149,
   "id": "22841f5a",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{1: p*(1 - p), 2: p**2 + (1 - p)**2, 4: p*(1 - p)}"
      ]
     },
     "execution_count": 149,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "density(X*Y).dict"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 152,
   "id": "8c2ee99a",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle p \\left(4 - 2 p\\right) + \\left(1 - p\\right) \\left(2 - p\\right)$"
      ],
      "text/plain": [
       "p*(4 - 2*p) + (1 - p)*(2 - p)"
      ]
     },
     "execution_count": 152,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "E(X*Y)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 153,
   "id": "3d4f0822",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle - p^{2} + p + 2$"
      ],
      "text/plain": [
       "-p**2 + p + 2"
      ]
     },
     "execution_count": 153,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "simplify(_)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 154,
   "id": "3168dbaa",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle 2 - p$"
      ],
      "text/plain": [
       "2 - p"
      ]
     },
     "execution_count": 154,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "E(X)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 155,
   "id": "9922504c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle p + 1$"
      ],
      "text/plain": [
       "p + 1"
      ]
     },
     "execution_count": 155,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "E(Y)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 156,
   "id": "bab6b634",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle s{\\left(\\frac{1}{x} \\right)}$"
      ],
      "text/plain": [
       "s(1/x)"
      ]
     },
     "execution_count": 156,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "s(1/x)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 158,
   "id": "e504ff9a",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\text{True}$"
      ],
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 158,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sqrt(2)>6/5"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 159,
   "id": "105b08a0",
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Help on class RecursiveSeq in module sympy.series.sequences:\n",
      "\n",
      "class RecursiveSeq(SeqBase)\n",
      " |  RecursiveSeq(recurrence, yn, n, initial=None, start=0)\n",
      " |  \n",
      " |  A finite degree recursive sequence.\n",
      " |  \n",
      " |  Explanation\n",
      " |  ===========\n",
      " |  \n",
      " |  That is, a sequence a(n) that depends on a fixed, finite number of its\n",
      " |  previous values. The general form is\n",
      " |  \n",
      " |      a(n) = f(a(n - 1), a(n - 2), ..., a(n - d))\n",
      " |  \n",
      " |  for some fixed, positive integer d, where f is some function defined by a\n",
      " |  SymPy expression.\n",
      " |  \n",
      " |  Parameters\n",
      " |  ==========\n",
      " |  \n",
      " |  recurrence : SymPy expression defining recurrence\n",
      " |      This is *not* an equality, only the expression that the nth term is\n",
      " |      equal to. For example, if :code:`a(n) = f(a(n - 1), ..., a(n - d))`,\n",
      " |      then the expression should be :code:`f(a(n - 1), ..., a(n - d))`.\n",
      " |  \n",
      " |  yn : applied undefined function\n",
      " |      Represents the nth term of the sequence as e.g. :code:`y(n)` where\n",
      " |      :code:`y` is an undefined function and `n` is the sequence index.\n",
      " |  \n",
      " |  n : symbolic argument\n",
      " |      The name of the variable that the recurrence is in, e.g., :code:`n` if\n",
      " |      the recurrence function is :code:`y(n)`.\n",
      " |  \n",
      " |  initial : iterable with length equal to the degree of the recurrence\n",
      " |      The initial values of the recurrence.\n",
      " |  \n",
      " |  start : start value of sequence (inclusive)\n",
      " |  \n",
      " |  Examples\n",
      " |  ========\n",
      " |  \n",
      " |  >>> from sympy import Function, symbols\n",
      " |  >>> from sympy.series.sequences import RecursiveSeq\n",
      " |  >>> y = Function(\"y\")\n",
      " |  >>> n = symbols(\"n\")\n",
      " |  >>> fib = RecursiveSeq(y(n - 1) + y(n - 2), y(n), n, [0, 1])\n",
      " |  \n",
      " |  >>> fib.coeff(3) # Value at a particular point\n",
      " |  2\n",
      " |  \n",
      " |  >>> fib[:6] # supports slicing\n",
      " |  [0, 1, 1, 2, 3, 5]\n",
      " |  \n",
      " |  >>> fib.recurrence # inspect recurrence\n",
      " |  Eq(y(n), y(n - 2) + y(n - 1))\n",
      " |  \n",
      " |  >>> fib.degree # automatically determine degree\n",
      " |  2\n",
      " |  \n",
      " |  >>> for x in zip(range(10), fib): # supports iteration\n",
      " |  ...     print(x)\n",
      " |  (0, 0)\n",
      " |  (1, 1)\n",
      " |  (2, 1)\n",
      " |  (3, 2)\n",
      " |  (4, 3)\n",
      " |  (5, 5)\n",
      " |  (6, 8)\n",
      " |  (7, 13)\n",
      " |  (8, 21)\n",
      " |  (9, 34)\n",
      " |  \n",
      " |  See Also\n",
      " |  ========\n",
      " |  \n",
      " |  sympy.series.sequences.SeqFormula\n",
      " |  \n",
      " |  Method resolution order:\n",
      " |      RecursiveSeq\n",
      " |      SeqBase\n",
      " |      sympy.core.basic.Basic\n",
      " |      sympy.printing.defaults.Printable\n",
      " |      builtins.object\n",
      " |  \n",
      " |  Methods defined here:\n",
      " |  \n",
      " |  __iter__(self)\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Static methods defined here:\n",
      " |  \n",
      " |  __new__(cls, recurrence, yn, n, initial=None, start=0)\n",
      " |      Create and return a new object.  See help(type) for accurate signature.\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Readonly properties defined here:\n",
      " |  \n",
      " |  initial\n",
      " |      The initial values of the sequence\n",
      " |  \n",
      " |  interval\n",
      " |      Interval on which sequence is defined.\n",
      " |  \n",
      " |  n\n",
      " |      Sequence index symbol\n",
      " |  \n",
      " |  recurrence\n",
      " |      Equation defining recurrence.\n",
      " |  \n",
      " |  start\n",
      " |      The starting point of the sequence. This point is included\n",
      " |  \n",
      " |  stop\n",
      " |      The ending point of the sequence. (oo)\n",
      " |  \n",
      " |  y\n",
      " |      Undefined function for the nth term of the sequence\n",
      " |  \n",
      " |  yn\n",
      " |      Applied function representing the nth term\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Data and other attributes defined here:\n",
      " |  \n",
      " |  default_assumptions = {'commutative': True}\n",
      " |  \n",
      " |  is_commutative = True\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Methods inherited from SeqBase:\n",
      " |  \n",
      " |  __add__(self, other)\n",
      " |      Returns the term-wise addition of 'self' and 'other'.\n",
      " |      \n",
      " |      ``other`` should be a sequence.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import SeqFormula\n",
      " |      >>> from sympy.abc import n\n",
      " |      >>> SeqFormula(n**2) + SeqFormula(n**3)\n",
      " |      SeqFormula(n**3 + n**2, (n, 0, oo))\n",
      " |  \n",
      " |  __getitem__(self, index)\n",
      " |  \n",
      " |  __mul__(self, other)\n",
      " |      Returns the term-wise multiplication of 'self' and 'other'.\n",
      " |      \n",
      " |      ``other`` should be a sequence. For ``other`` not being a\n",
      " |      sequence see :func:`coeff_mul` method.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import SeqFormula\n",
      " |      >>> from sympy.abc import n\n",
      " |      >>> SeqFormula(n**2) * (SeqFormula(n))\n",
      " |      SeqFormula(n**3, (n, 0, oo))\n",
      " |  \n",
      " |  __neg__(self)\n",
      " |      Negates the sequence.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import SeqFormula\n",
      " |      >>> from sympy.abc import n\n",
      " |      >>> -SeqFormula(n**2)\n",
      " |      SeqFormula(-n**2, (n, 0, oo))\n",
      " |  \n",
      " |  __radd__(self, other)\n",
      " |  \n",
      " |  __rmul__(self, other)\n",
      " |  \n",
      " |  __rsub__(self, other)\n",
      " |  \n",
      " |  __sub__(self, other)\n",
      " |      Returns the term-wise subtraction of ``self`` and ``other``.\n",
      " |      \n",
      " |      ``other`` should be a sequence.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import SeqFormula\n",
      " |      >>> from sympy.abc import n\n",
      " |      >>> SeqFormula(n**2) - (SeqFormula(n))\n",
      " |      SeqFormula(n**2 - n, (n, 0, oo))\n",
      " |  \n",
      " |  coeff(self, pt)\n",
      " |      Returns the coefficient at point pt\n",
      " |  \n",
      " |  coeff_mul(self, other)\n",
      " |      Should be used when ``other`` is not a sequence. Should be\n",
      " |      defined to define custom behaviour.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import SeqFormula\n",
      " |      >>> from sympy.abc import n\n",
      " |      >>> SeqFormula(n**2).coeff_mul(2)\n",
      " |      SeqFormula(2*n**2, (n, 0, oo))\n",
      " |      \n",
      " |      Notes\n",
      " |      =====\n",
      " |      \n",
      " |      '*' defines multiplication of sequences with sequences only.\n",
      " |  \n",
      " |  find_linear_recurrence(self, n, d=None, gfvar=None)\n",
      " |      Finds the shortest linear recurrence that satisfies the first n\n",
      " |      terms of sequence of order `\\leq` ``n/2`` if possible.\n",
      " |      If ``d`` is specified, find shortest linear recurrence of order\n",
      " |      `\\leq` min(d, n/2) if possible.\n",
      " |      Returns list of coefficients ``[b(1), b(2), ...]`` corresponding to the\n",
      " |      recurrence relation ``x(n) = b(1)*x(n-1) + b(2)*x(n-2) + ...``\n",
      " |      Returns ``[]`` if no recurrence is found.\n",
      " |      If gfvar is specified, also returns ordinary generating function as a\n",
      " |      function of gfvar.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import sequence, sqrt, oo, lucas\n",
      " |      >>> from sympy.abc import n, x, y\n",
      " |      >>> sequence(n**2).find_linear_recurrence(10, 2)\n",
      " |      []\n",
      " |      >>> sequence(n**2).find_linear_recurrence(10)\n",
      " |      [3, -3, 1]\n",
      " |      >>> sequence(2**n).find_linear_recurrence(10)\n",
      " |      [2]\n",
      " |      >>> sequence(23*n**4+91*n**2).find_linear_recurrence(10)\n",
      " |      [5, -10, 10, -5, 1]\n",
      " |      >>> sequence(sqrt(5)*(((1 + sqrt(5))/2)**n - (-(1 + sqrt(5))/2)**(-n))/5).find_linear_recurrence(10)\n",
      " |      [1, 1]\n",
      " |      >>> sequence(x+y*(-2)**(-n), (n, 0, oo)).find_linear_recurrence(30)\n",
      " |      [1/2, 1/2]\n",
      " |      >>> sequence(3*5**n + 12).find_linear_recurrence(20,gfvar=x)\n",
      " |      ([6, -5], 3*(5 - 21*x)/((x - 1)*(5*x - 1)))\n",
      " |      >>> sequence(lucas(n)).find_linear_recurrence(15,gfvar=x)\n",
      " |      ([1, 1], (x - 2)/(x**2 + x - 1))\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Readonly properties inherited from SeqBase:\n",
      " |  \n",
      " |  free_symbols\n",
      " |      This method returns the symbols in the object, excluding those\n",
      " |      that take on a specific value (i.e. the dummy symbols).\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import SeqFormula\n",
      " |      >>> from sympy.abc import n, m\n",
      " |      >>> SeqFormula(m*n**2, (n, 0, 5)).free_symbols\n",
      " |      {m}\n",
      " |  \n",
      " |  gen\n",
      " |      Returns the generator for the sequence\n",
      " |  \n",
      " |  length\n",
      " |      Length of the sequence\n",
      " |  \n",
      " |  variables\n",
      " |      Returns a tuple of variables that are bounded\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Data descriptors inherited from SeqBase:\n",
      " |  \n",
      " |  __dict__\n",
      " |      dictionary for instance variables (if defined)\n",
      " |  \n",
      " |  __weakref__\n",
      " |      list of weak references to the object (if defined)\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Methods inherited from sympy.core.basic.Basic:\n",
      " |  \n",
      " |  __eq__(self, other)\n",
      " |      Return a boolean indicating whether a == b on the basis of\n",
      " |      their symbolic trees.\n",
      " |      \n",
      " |      This is the same as a.compare(b) == 0 but faster.\n",
      " |      \n",
      " |      Notes\n",
      " |      =====\n",
      " |      \n",
      " |      If a class that overrides __eq__() needs to retain the\n",
      " |      implementation of __hash__() from a parent class, the\n",
      " |      interpreter must be told this explicitly by setting\n",
      " |      __hash__ : Callable[[object], int] = <ParentClass>.__hash__.\n",
      " |      Otherwise the inheritance of __hash__() will be blocked,\n",
      " |      just as if __hash__ had been explicitly set to None.\n",
      " |      \n",
      " |      References\n",
      " |      ==========\n",
      " |      \n",
      " |      from https://docs.python.org/dev/reference/datamodel.html#object.__hash__\n",
      " |  \n",
      " |  __getnewargs__(self)\n",
      " |  \n",
      " |  __getstate__(self)\n",
      " |  \n",
      " |  __hash__(self) -> 'int'\n",
      " |      Return hash(self).\n",
      " |  \n",
      " |  __ne__(self, other)\n",
      " |      ``a != b``  -> Compare two symbolic trees and see whether they are different\n",
      " |      \n",
      " |      this is the same as:\n",
      " |      \n",
      " |      ``a.compare(b) != 0``\n",
      " |      \n",
      " |      but faster\n",
      " |  \n",
      " |  __reduce_ex__(self, protocol)\n",
      " |      Helper for pickle.\n",
      " |  \n",
      " |  __setstate__(self, state)\n",
      " |  \n",
      " |  as_content_primitive(self, radical=False, clear=True)\n",
      " |      A stub to allow Basic args (like Tuple) to be skipped when computing\n",
      " |      the content and primitive components of an expression.\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      sympy.core.expr.Expr.as_content_primitive\n",
      " |  \n",
      " |  as_dummy(self)\n",
      " |      Return the expression with any objects having structurally\n",
      " |      bound symbols replaced with unique, canonical symbols within\n",
      " |      the object in which they appear and having only the default\n",
      " |      assumption for commutativity being True. When applied to a\n",
      " |      symbol a new symbol having only the same commutativity will be\n",
      " |      returned.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Integral, Symbol\n",
      " |      >>> from sympy.abc import x\n",
      " |      >>> r = Symbol('r', real=True)\n",
      " |      >>> Integral(r, (r, x)).as_dummy()\n",
      " |      Integral(_0, (_0, x))\n",
      " |      >>> _.variables[0].is_real is None\n",
      " |      True\n",
      " |      >>> r.as_dummy()\n",
      " |      _r\n",
      " |      \n",
      " |      Notes\n",
      " |      =====\n",
      " |      \n",
      " |      Any object that has structurally bound variables should have\n",
      " |      a property, `bound_symbols` that returns those symbols\n",
      " |      appearing in the object.\n",
      " |  \n",
      " |  atoms(self, *types)\n",
      " |      Returns the atoms that form the current object.\n",
      " |      \n",
      " |      By default, only objects that are truly atomic and cannot\n",
      " |      be divided into smaller pieces are returned: symbols, numbers,\n",
      " |      and number symbols like I and pi. It is possible to request\n",
      " |      atoms of any type, however, as demonstrated below.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import I, pi, sin\n",
      " |      >>> from sympy.abc import x, y\n",
      " |      >>> (1 + x + 2*sin(y + I*pi)).atoms()\n",
      " |      {1, 2, I, pi, x, y}\n",
      " |      \n",
      " |      If one or more types are given, the results will contain only\n",
      " |      those types of atoms.\n",
      " |      \n",
      " |      >>> from sympy import Number, NumberSymbol, Symbol\n",
      " |      >>> (1 + x + 2*sin(y + I*pi)).atoms(Symbol)\n",
      " |      {x, y}\n",
      " |      \n",
      " |      >>> (1 + x + 2*sin(y + I*pi)).atoms(Number)\n",
      " |      {1, 2}\n",
      " |      \n",
      " |      >>> (1 + x + 2*sin(y + I*pi)).atoms(Number, NumberSymbol)\n",
      " |      {1, 2, pi}\n",
      " |      \n",
      " |      >>> (1 + x + 2*sin(y + I*pi)).atoms(Number, NumberSymbol, I)\n",
      " |      {1, 2, I, pi}\n",
      " |      \n",
      " |      Note that I (imaginary unit) and zoo (complex infinity) are special\n",
      " |      types of number symbols and are not part of the NumberSymbol class.\n",
      " |      \n",
      " |      The type can be given implicitly, too:\n",
      " |      \n",
      " |      >>> (1 + x + 2*sin(y + I*pi)).atoms(x) # x is a Symbol\n",
      " |      {x, y}\n",
      " |      \n",
      " |      Be careful to check your assumptions when using the implicit option\n",
      " |      since ``S(1).is_Integer = True`` but ``type(S(1))`` is ``One``, a special type\n",
      " |      of SymPy atom, while ``type(S(2))`` is type ``Integer`` and will find all\n",
      " |      integers in an expression:\n",
      " |      \n",
      " |      >>> from sympy import S\n",
      " |      >>> (1 + x + 2*sin(y + I*pi)).atoms(S(1))\n",
      " |      {1}\n",
      " |      \n",
      " |      >>> (1 + x + 2*sin(y + I*pi)).atoms(S(2))\n",
      " |      {1, 2}\n",
      " |      \n",
      " |      Finally, arguments to atoms() can select more than atomic atoms: any\n",
      " |      SymPy type (loaded in core/__init__.py) can be listed as an argument\n",
      " |      and those types of \"atoms\" as found in scanning the arguments of the\n",
      " |      expression recursively:\n",
      " |      \n",
      " |      >>> from sympy import Function, Mul\n",
      " |      >>> from sympy.core.function import AppliedUndef\n",
      " |      >>> f = Function('f')\n",
      " |      >>> (1 + f(x) + 2*sin(y + I*pi)).atoms(Function)\n",
      " |      {f(x), sin(y + I*pi)}\n",
      " |      >>> (1 + f(x) + 2*sin(y + I*pi)).atoms(AppliedUndef)\n",
      " |      {f(x)}\n",
      " |      \n",
      " |      >>> (1 + x + 2*sin(y + I*pi)).atoms(Mul)\n",
      " |      {I*pi, 2*sin(y + I*pi)}\n",
      " |  \n",
      " |  compare(self, other)\n",
      " |      Return -1, 0, 1 if the object is smaller, equal, or greater than other.\n",
      " |      \n",
      " |      Not in the mathematical sense. If the object is of a different type\n",
      " |      from the \"other\" then their classes are ordered according to\n",
      " |      the sorted_classes list.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy.abc import x, y\n",
      " |      >>> x.compare(y)\n",
      " |      -1\n",
      " |      >>> x.compare(x)\n",
      " |      0\n",
      " |      >>> y.compare(x)\n",
      " |      1\n",
      " |  \n",
      " |  copy(self)\n",
      " |  \n",
      " |  could_extract_minus_sign(self)\n",
      " |  \n",
      " |  count(self, query)\n",
      " |      Count the number of matching subexpressions.\n",
      " |  \n",
      " |  count_ops(self, visual=None)\n",
      " |      Wrapper for count_ops that returns the operation count.\n",
      " |  \n",
      " |  doit(self, **hints)\n",
      " |      Evaluate objects that are not evaluated by default like limits,\n",
      " |      integrals, sums and products. All objects of this kind will be\n",
      " |      evaluated recursively, unless some species were excluded via 'hints'\n",
      " |      or unless the 'deep' hint was set to 'False'.\n",
      " |      \n",
      " |      >>> from sympy import Integral\n",
      " |      >>> from sympy.abc import x\n",
      " |      \n",
      " |      >>> 2*Integral(x, x)\n",
      " |      2*Integral(x, x)\n",
      " |      \n",
      " |      >>> (2*Integral(x, x)).doit()\n",
      " |      x**2\n",
      " |      \n",
      " |      >>> (2*Integral(x, x)).doit(deep=False)\n",
      " |      2*Integral(x, x)\n",
      " |  \n",
      " |  dummy_eq(self, other, symbol=None)\n",
      " |      Compare two expressions and handle dummy symbols.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Dummy\n",
      " |      >>> from sympy.abc import x, y\n",
      " |      \n",
      " |      >>> u = Dummy('u')\n",
      " |      \n",
      " |      >>> (u**2 + 1).dummy_eq(x**2 + 1)\n",
      " |      True\n",
      " |      >>> (u**2 + 1) == (x**2 + 1)\n",
      " |      False\n",
      " |      \n",
      " |      >>> (u**2 + y).dummy_eq(x**2 + y, x)\n",
      " |      True\n",
      " |      >>> (u**2 + y).dummy_eq(x**2 + y, y)\n",
      " |      False\n",
      " |  \n",
      " |  find(self, query, group=False)\n",
      " |      Find all subexpressions matching a query.\n",
      " |  \n",
      " |  has(self, *patterns)\n",
      " |      Test whether any subexpression matches any of the patterns.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import sin\n",
      " |      >>> from sympy.abc import x, y, z\n",
      " |      >>> (x**2 + sin(x*y)).has(z)\n",
      " |      False\n",
      " |      >>> (x**2 + sin(x*y)).has(x, y, z)\n",
      " |      True\n",
      " |      >>> x.has(x)\n",
      " |      True\n",
      " |      \n",
      " |      Note ``has`` is a structural algorithm with no knowledge of\n",
      " |      mathematics. Consider the following half-open interval:\n",
      " |      \n",
      " |      >>> from sympy import Interval\n",
      " |      >>> i = Interval.Lopen(0, 5); i\n",
      " |      Interval.Lopen(0, 5)\n",
      " |      >>> i.args\n",
      " |      (0, 5, True, False)\n",
      " |      >>> i.has(4)  # there is no \"4\" in the arguments\n",
      " |      False\n",
      " |      >>> i.has(0)  # there *is* a \"0\" in the arguments\n",
      " |      True\n",
      " |      \n",
      " |      Instead, use ``contains`` to determine whether a number is in the\n",
      " |      interval or not:\n",
      " |      \n",
      " |      >>> i.contains(4)\n",
      " |      True\n",
      " |      >>> i.contains(0)\n",
      " |      False\n",
      " |      \n",
      " |      \n",
      " |      Note that ``expr.has(*patterns)`` is exactly equivalent to\n",
      " |      ``any(expr.has(p) for p in patterns)``. In particular, ``False`` is\n",
      " |      returned when the list of patterns is empty.\n",
      " |      \n",
      " |      >>> x.has()\n",
      " |      False\n",
      " |  \n",
      " |  has_free(self, *patterns)\n",
      " |      Return True if self has object(s) ``x`` as a free expression\n",
      " |      else False.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Integral, Function\n",
      " |      >>> from sympy.abc import x, y\n",
      " |      >>> f = Function('f')\n",
      " |      >>> g = Function('g')\n",
      " |      >>> expr = Integral(f(x), (f(x), 1, g(y)))\n",
      " |      >>> expr.free_symbols\n",
      " |      {y}\n",
      " |      >>> expr.has_free(g(y))\n",
      " |      True\n",
      " |      >>> expr.has_free(*(x, f(x)))\n",
      " |      False\n",
      " |      \n",
      " |      This works for subexpressions and types, too:\n",
      " |      \n",
      " |      >>> expr.has_free(g)\n",
      " |      True\n",
      " |      >>> (x + y + 1).has_free(y + 1)\n",
      " |      True\n",
      " |  \n",
      " |  has_xfree(self, s: 'set[Basic]')\n",
      " |      Return True if self has any of the patterns in s as a\n",
      " |      free argument, else False. This is like `Basic.has_free`\n",
      " |      but this will only report exact argument matches.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Function\n",
      " |      >>> from sympy.abc import x, y\n",
      " |      >>> f = Function('f')\n",
      " |      >>> f(x).has_xfree({f})\n",
      " |      False\n",
      " |      >>> f(x).has_xfree({f(x)})\n",
      " |      True\n",
      " |      >>> f(x + 1).has_xfree({x})\n",
      " |      True\n",
      " |      >>> f(x + 1).has_xfree({x + 1})\n",
      " |      True\n",
      " |      >>> f(x + y + 1).has_xfree({x + 1})\n",
      " |      False\n",
      " |  \n",
      " |  is_hypergeometric(self, k)\n",
      " |  \n",
      " |  match(self, pattern, old=False)\n",
      " |      Pattern matching.\n",
      " |      \n",
      " |      Wild symbols match all.\n",
      " |      \n",
      " |      Return ``None`` when expression (self) does not match\n",
      " |      with pattern. Otherwise return a dictionary such that::\n",
      " |      \n",
      " |        pattern.xreplace(self.match(pattern)) == self\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Wild, Sum\n",
      " |      >>> from sympy.abc import x, y\n",
      " |      >>> p = Wild(\"p\")\n",
      " |      >>> q = Wild(\"q\")\n",
      " |      >>> r = Wild(\"r\")\n",
      " |      >>> e = (x+y)**(x+y)\n",
      " |      >>> e.match(p**p)\n",
      " |      {p_: x + y}\n",
      " |      >>> e.match(p**q)\n",
      " |      {p_: x + y, q_: x + y}\n",
      " |      >>> e = (2*x)**2\n",
      " |      >>> e.match(p*q**r)\n",
      " |      {p_: 4, q_: x, r_: 2}\n",
      " |      >>> (p*q**r).xreplace(e.match(p*q**r))\n",
      " |      4*x**2\n",
      " |      \n",
      " |      Structurally bound symbols are ignored during matching:\n",
      " |      \n",
      " |      >>> Sum(x, (x, 1, 2)).match(Sum(y, (y, 1, p)))\n",
      " |      {p_: 2}\n",
      " |      \n",
      " |      But they can be identified if desired:\n",
      " |      \n",
      " |      >>> Sum(x, (x, 1, 2)).match(Sum(q, (q, 1, p)))\n",
      " |      {p_: 2, q_: x}\n",
      " |      \n",
      " |      The ``old`` flag will give the old-style pattern matching where\n",
      " |      expressions and patterns are essentially solved to give the\n",
      " |      match. Both of the following give None unless ``old=True``:\n",
      " |      \n",
      " |      >>> (x - 2).match(p - x, old=True)\n",
      " |      {p_: 2*x - 2}\n",
      " |      >>> (2/x).match(p*x, old=True)\n",
      " |      {p_: 2/x**2}\n",
      " |  \n",
      " |  matches(self, expr, repl_dict=None, old=False)\n",
      " |      Helper method for match() that looks for a match between Wild symbols\n",
      " |      in self and expressions in expr.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import symbols, Wild, Basic\n",
      " |      >>> a, b, c = symbols('a b c')\n",
      " |      >>> x = Wild('x')\n",
      " |      >>> Basic(a + x, x).matches(Basic(a + b, c)) is None\n",
      " |      True\n",
      " |      >>> Basic(a + x, x).matches(Basic(a + b + c, b + c))\n",
      " |      {x_: b + c}\n",
      " |  \n",
      " |  rcall(self, *args)\n",
      " |      Apply on the argument recursively through the expression tree.\n",
      " |      \n",
      " |      This method is used to simulate a common abuse of notation for\n",
      " |      operators. For instance, in SymPy the following will not work:\n",
      " |      \n",
      " |      ``(x+Lambda(y, 2*y))(z) == x+2*z``,\n",
      " |      \n",
      " |      however, you can use:\n",
      " |      \n",
      " |      >>> from sympy import Lambda\n",
      " |      >>> from sympy.abc import x, y, z\n",
      " |      >>> (x + Lambda(y, 2*y)).rcall(z)\n",
      " |      x + 2*z\n",
      " |  \n",
      " |  refine(self, assumption=True)\n",
      " |      See the refine function in sympy.assumptions\n",
      " |  \n",
      " |  replace(self, query, value, map=False, simultaneous=True, exact=None)\n",
      " |      Replace matching subexpressions of ``self`` with ``value``.\n",
      " |      \n",
      " |      If ``map = True`` then also return the mapping {old: new} where ``old``\n",
      " |      was a sub-expression found with query and ``new`` is the replacement\n",
      " |      value for it. If the expression itself does not match the query, then\n",
      " |      the returned value will be ``self.xreplace(map)`` otherwise it should\n",
      " |      be ``self.subs(ordered(map.items()))``.\n",
      " |      \n",
      " |      Traverses an expression tree and performs replacement of matching\n",
      " |      subexpressions from the bottom to the top of the tree. The default\n",
      " |      approach is to do the replacement in a simultaneous fashion so\n",
      " |      changes made are targeted only once. If this is not desired or causes\n",
      " |      problems, ``simultaneous`` can be set to False.\n",
      " |      \n",
      " |      In addition, if an expression containing more than one Wild symbol\n",
      " |      is being used to match subexpressions and the ``exact`` flag is None\n",
      " |      it will be set to True so the match will only succeed if all non-zero\n",
      " |      values are received for each Wild that appears in the match pattern.\n",
      " |      Setting this to False accepts a match of 0; while setting it True\n",
      " |      accepts all matches that have a 0 in them. See example below for\n",
      " |      cautions.\n",
      " |      \n",
      " |      The list of possible combinations of queries and replacement values\n",
      " |      is listed below:\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      Initial setup\n",
      " |      \n",
      " |      >>> from sympy import log, sin, cos, tan, Wild, Mul, Add\n",
      " |      >>> from sympy.abc import x, y\n",
      " |      >>> f = log(sin(x)) + tan(sin(x**2))\n",
      " |      \n",
      " |      1.1. type -> type\n",
      " |          obj.replace(type, newtype)\n",
      " |      \n",
      " |          When object of type ``type`` is found, replace it with the\n",
      " |          result of passing its argument(s) to ``newtype``.\n",
      " |      \n",
      " |          >>> f.replace(sin, cos)\n",
      " |          log(cos(x)) + tan(cos(x**2))\n",
      " |          >>> sin(x).replace(sin, cos, map=True)\n",
      " |          (cos(x), {sin(x): cos(x)})\n",
      " |          >>> (x*y).replace(Mul, Add)\n",
      " |          x + y\n",
      " |      \n",
      " |      1.2. type -> func\n",
      " |          obj.replace(type, func)\n",
      " |      \n",
      " |          When object of type ``type`` is found, apply ``func`` to its\n",
      " |          argument(s). ``func`` must be written to handle the number\n",
      " |          of arguments of ``type``.\n",
      " |      \n",
      " |          >>> f.replace(sin, lambda arg: sin(2*arg))\n",
      " |          log(sin(2*x)) + tan(sin(2*x**2))\n",
      " |          >>> (x*y).replace(Mul, lambda *args: sin(2*Mul(*args)))\n",
      " |          sin(2*x*y)\n",
      " |      \n",
      " |      2.1. pattern -> expr\n",
      " |          obj.replace(pattern(wild), expr(wild))\n",
      " |      \n",
      " |          Replace subexpressions matching ``pattern`` with the expression\n",
      " |          written in terms of the Wild symbols in ``pattern``.\n",
      " |      \n",
      " |          >>> a, b = map(Wild, 'ab')\n",
      " |          >>> f.replace(sin(a), tan(a))\n",
      " |          log(tan(x)) + tan(tan(x**2))\n",
      " |          >>> f.replace(sin(a), tan(a/2))\n",
      " |          log(tan(x/2)) + tan(tan(x**2/2))\n",
      " |          >>> f.replace(sin(a), a)\n",
      " |          log(x) + tan(x**2)\n",
      " |          >>> (x*y).replace(a*x, a)\n",
      " |          y\n",
      " |      \n",
      " |          Matching is exact by default when more than one Wild symbol\n",
      " |          is used: matching fails unless the match gives non-zero\n",
      " |          values for all Wild symbols:\n",
      " |      \n",
      " |          >>> (2*x + y).replace(a*x + b, b - a)\n",
      " |          y - 2\n",
      " |          >>> (2*x).replace(a*x + b, b - a)\n",
      " |          2*x\n",
      " |      \n",
      " |          When set to False, the results may be non-intuitive:\n",
      " |      \n",
      " |          >>> (2*x).replace(a*x + b, b - a, exact=False)\n",
      " |          2/x\n",
      " |      \n",
      " |      2.2. pattern -> func\n",
      " |          obj.replace(pattern(wild), lambda wild: expr(wild))\n",
      " |      \n",
      " |          All behavior is the same as in 2.1 but now a function in terms of\n",
      " |          pattern variables is used rather than an expression:\n",
      " |      \n",
      " |          >>> f.replace(sin(a), lambda a: sin(2*a))\n",
      " |          log(sin(2*x)) + tan(sin(2*x**2))\n",
      " |      \n",
      " |      3.1. func -> func\n",
      " |          obj.replace(filter, func)\n",
      " |      \n",
      " |          Replace subexpression ``e`` with ``func(e)`` if ``filter(e)``\n",
      " |          is True.\n",
      " |      \n",
      " |          >>> g = 2*sin(x**3)\n",
      " |          >>> g.replace(lambda expr: expr.is_Number, lambda expr: expr**2)\n",
      " |          4*sin(x**9)\n",
      " |      \n",
      " |      The expression itself is also targeted by the query but is done in\n",
      " |      such a fashion that changes are not made twice.\n",
      " |      \n",
      " |          >>> e = x*(x*y + 1)\n",
      " |          >>> e.replace(lambda x: x.is_Mul, lambda x: 2*x)\n",
      " |          2*x*(2*x*y + 1)\n",
      " |      \n",
      " |      When matching a single symbol, `exact` will default to True, but\n",
      " |      this may or may not be the behavior that is desired:\n",
      " |      \n",
      " |      Here, we want `exact=False`:\n",
      " |      \n",
      " |      >>> from sympy import Function\n",
      " |      >>> f = Function('f')\n",
      " |      >>> e = f(1) + f(0)\n",
      " |      >>> q = f(a), lambda a: f(a + 1)\n",
      " |      >>> e.replace(*q, exact=False)\n",
      " |      f(1) + f(2)\n",
      " |      >>> e.replace(*q, exact=True)\n",
      " |      f(0) + f(2)\n",
      " |      \n",
      " |      But here, the nature of matching makes selecting\n",
      " |      the right setting tricky:\n",
      " |      \n",
      " |      >>> e = x**(1 + y)\n",
      " |      >>> (x**(1 + y)).replace(x**(1 + a), lambda a: x**-a, exact=False)\n",
      " |      x\n",
      " |      >>> (x**(1 + y)).replace(x**(1 + a), lambda a: x**-a, exact=True)\n",
      " |      x**(-x - y + 1)\n",
      " |      >>> (x**y).replace(x**(1 + a), lambda a: x**-a, exact=False)\n",
      " |      x\n",
      " |      >>> (x**y).replace(x**(1 + a), lambda a: x**-a, exact=True)\n",
      " |      x**(1 - y)\n",
      " |      \n",
      " |      It is probably better to use a different form of the query\n",
      " |      that describes the target expression more precisely:\n",
      " |      \n",
      " |      >>> (1 + x**(1 + y)).replace(\n",
      " |      ... lambda x: x.is_Pow and x.exp.is_Add and x.exp.args[0] == 1,\n",
      " |      ... lambda x: x.base**(1 - (x.exp - 1)))\n",
      " |      ...\n",
      " |      x**(1 - y) + 1\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      \n",
      " |      subs: substitution of subexpressions as defined by the objects\n",
      " |            themselves.\n",
      " |      xreplace: exact node replacement in expr tree; also capable of\n",
      " |                using matching rules\n",
      " |  \n",
      " |  rewrite(self, *args, deep=True, **hints)\n",
      " |      Rewrite *self* using a defined rule.\n",
      " |      \n",
      " |      Rewriting transforms an expression to another, which is mathematically\n",
      " |      equivalent but structurally different. For example you can rewrite\n",
      " |      trigonometric functions as complex exponentials or combinatorial\n",
      " |      functions as gamma function.\n",
      " |      \n",
      " |      This method takes a *pattern* and a *rule* as positional arguments.\n",
      " |      *pattern* is optional parameter which defines the types of expressions\n",
      " |      that will be transformed. If it is not passed, all possible expressions\n",
      " |      will be rewritten. *rule* defines how the expression will be rewritten.\n",
      " |      \n",
      " |      Parameters\n",
      " |      ==========\n",
      " |      \n",
      " |      args : Expr\n",
      " |          A *rule*, or *pattern* and *rule*.\n",
      " |          - *pattern* is a type or an iterable of types.\n",
      " |          - *rule* can be any object.\n",
      " |      \n",
      " |      deep : bool, optional\n",
      " |          If ``True``, subexpressions are recursively transformed. Default is\n",
      " |          ``True``.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      If *pattern* is unspecified, all possible expressions are transformed.\n",
      " |      \n",
      " |      >>> from sympy import cos, sin, exp, I\n",
      " |      >>> from sympy.abc import x\n",
      " |      >>> expr = cos(x) + I*sin(x)\n",
      " |      >>> expr.rewrite(exp)\n",
      " |      exp(I*x)\n",
      " |      \n",
      " |      Pattern can be a type or an iterable of types.\n",
      " |      \n",
      " |      >>> expr.rewrite(sin, exp)\n",
      " |      exp(I*x)/2 + cos(x) - exp(-I*x)/2\n",
      " |      >>> expr.rewrite([cos,], exp)\n",
      " |      exp(I*x)/2 + I*sin(x) + exp(-I*x)/2\n",
      " |      >>> expr.rewrite([cos, sin], exp)\n",
      " |      exp(I*x)\n",
      " |      \n",
      " |      Rewriting behavior can be implemented by defining ``_eval_rewrite()``\n",
      " |      method.\n",
      " |      \n",
      " |      >>> from sympy import Expr, sqrt, pi\n",
      " |      >>> class MySin(Expr):\n",
      " |      ...     def _eval_rewrite(self, rule, args, **hints):\n",
      " |      ...         x, = args\n",
      " |      ...         if rule == cos:\n",
      " |      ...             return cos(pi/2 - x, evaluate=False)\n",
      " |      ...         if rule == sqrt:\n",
      " |      ...             return sqrt(1 - cos(x)**2)\n",
      " |      >>> MySin(MySin(x)).rewrite(cos)\n",
      " |      cos(-cos(-x + pi/2) + pi/2)\n",
      " |      >>> MySin(x).rewrite(sqrt)\n",
      " |      sqrt(1 - cos(x)**2)\n",
      " |      \n",
      " |      Defining ``_eval_rewrite_as_[...]()`` method is supported for backwards\n",
      " |      compatibility reason. This may be removed in the future and using it is\n",
      " |      discouraged.\n",
      " |      \n",
      " |      >>> class MySin(Expr):\n",
      " |      ...     def _eval_rewrite_as_cos(self, *args, **hints):\n",
      " |      ...         x, = args\n",
      " |      ...         return cos(pi/2 - x, evaluate=False)\n",
      " |      >>> MySin(x).rewrite(cos)\n",
      " |      cos(-x + pi/2)\n",
      " |  \n",
      " |  simplify(self, **kwargs)\n",
      " |      See the simplify function in sympy.simplify\n",
      " |  \n",
      " |  sort_key(self, order=None)\n",
      " |      Return a sort key.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import S, I\n",
      " |      \n",
      " |      >>> sorted([S(1)/2, I, -I], key=lambda x: x.sort_key())\n",
      " |      [1/2, -I, I]\n",
      " |      \n",
      " |      >>> S(\"[x, 1/x, 1/x**2, x**2, x**(1/2), x**(1/4), x**(3/2)]\")\n",
      " |      [x, 1/x, x**(-2), x**2, sqrt(x), x**(1/4), x**(3/2)]\n",
      " |      >>> sorted(_, key=lambda x: x.sort_key())\n",
      " |      [x**(-2), 1/x, x**(1/4), sqrt(x), x, x**(3/2), x**2]\n",
      " |  \n",
      " |  subs(self, *args, **kwargs)\n",
      " |      Substitutes old for new in an expression after sympifying args.\n",
      " |      \n",
      " |      `args` is either:\n",
      " |        - two arguments, e.g. foo.subs(old, new)\n",
      " |        - one iterable argument, e.g. foo.subs(iterable). The iterable may be\n",
      " |           o an iterable container with (old, new) pairs. In this case the\n",
      " |             replacements are processed in the order given with successive\n",
      " |             patterns possibly affecting replacements already made.\n",
      " |           o a dict or set whose key/value items correspond to old/new pairs.\n",
      " |             In this case the old/new pairs will be sorted by op count and in\n",
      " |             case of a tie, by number of args and the default_sort_key. The\n",
      " |             resulting sorted list is then processed as an iterable container\n",
      " |             (see previous).\n",
      " |      \n",
      " |      If the keyword ``simultaneous`` is True, the subexpressions will not be\n",
      " |      evaluated until all the substitutions have been made.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import pi, exp, limit, oo\n",
      " |      >>> from sympy.abc import x, y\n",
      " |      >>> (1 + x*y).subs(x, pi)\n",
      " |      pi*y + 1\n",
      " |      >>> (1 + x*y).subs({x:pi, y:2})\n",
      " |      1 + 2*pi\n",
      " |      >>> (1 + x*y).subs([(x, pi), (y, 2)])\n",
      " |      1 + 2*pi\n",
      " |      >>> reps = [(y, x**2), (x, 2)]\n",
      " |      >>> (x + y).subs(reps)\n",
      " |      6\n",
      " |      >>> (x + y).subs(reversed(reps))\n",
      " |      x**2 + 2\n",
      " |      \n",
      " |      >>> (x**2 + x**4).subs(x**2, y)\n",
      " |      y**2 + y\n",
      " |      \n",
      " |      To replace only the x**2 but not the x**4, use xreplace:\n",
      " |      \n",
      " |      >>> (x**2 + x**4).xreplace({x**2: y})\n",
      " |      x**4 + y\n",
      " |      \n",
      " |      To delay evaluation until all substitutions have been made,\n",
      " |      set the keyword ``simultaneous`` to True:\n",
      " |      \n",
      " |      >>> (x/y).subs([(x, 0), (y, 0)])\n",
      " |      0\n",
      " |      >>> (x/y).subs([(x, 0), (y, 0)], simultaneous=True)\n",
      " |      nan\n",
      " |      \n",
      " |      This has the added feature of not allowing subsequent substitutions\n",
      " |      to affect those already made:\n",
      " |      \n",
      " |      >>> ((x + y)/y).subs({x + y: y, y: x + y})\n",
      " |      1\n",
      " |      >>> ((x + y)/y).subs({x + y: y, y: x + y}, simultaneous=True)\n",
      " |      y/(x + y)\n",
      " |      \n",
      " |      In order to obtain a canonical result, unordered iterables are\n",
      " |      sorted by count_op length, number of arguments and by the\n",
      " |      default_sort_key to break any ties. All other iterables are left\n",
      " |      unsorted.\n",
      " |      \n",
      " |      >>> from sympy import sqrt, sin, cos\n",
      " |      >>> from sympy.abc import a, b, c, d, e\n",
      " |      \n",
      " |      >>> A = (sqrt(sin(2*x)), a)\n",
      " |      >>> B = (sin(2*x), b)\n",
      " |      >>> C = (cos(2*x), c)\n",
      " |      >>> D = (x, d)\n",
      " |      >>> E = (exp(x), e)\n",
      " |      \n",
      " |      >>> expr = sqrt(sin(2*x))*sin(exp(x)*x)*cos(2*x) + sin(2*x)\n",
      " |      \n",
      " |      >>> expr.subs(dict([A, B, C, D, E]))\n",
      " |      a*c*sin(d*e) + b\n",
      " |      \n",
      " |      The resulting expression represents a literal replacement of the\n",
      " |      old arguments with the new arguments. This may not reflect the\n",
      " |      limiting behavior of the expression:\n",
      " |      \n",
      " |      >>> (x**3 - 3*x).subs({x: oo})\n",
      " |      nan\n",
      " |      \n",
      " |      >>> limit(x**3 - 3*x, x, oo)\n",
      " |      oo\n",
      " |      \n",
      " |      If the substitution will be followed by numerical\n",
      " |      evaluation, it is better to pass the substitution to\n",
      " |      evalf as\n",
      " |      \n",
      " |      >>> (1/x).evalf(subs={x: 3.0}, n=21)\n",
      " |      0.333333333333333333333\n",
      " |      \n",
      " |      rather than\n",
      " |      \n",
      " |      >>> (1/x).subs({x: 3.0}).evalf(21)\n",
      " |      0.333333333333333314830\n",
      " |      \n",
      " |      as the former will ensure that the desired level of precision is\n",
      " |      obtained.\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      replace: replacement capable of doing wildcard-like matching,\n",
      " |               parsing of match, and conditional replacements\n",
      " |      xreplace: exact node replacement in expr tree; also capable of\n",
      " |                using matching rules\n",
      " |      sympy.core.evalf.EvalfMixin.evalf: calculates the given formula to a desired level of precision\n",
      " |  \n",
      " |  xreplace(self, rule)\n",
      " |      Replace occurrences of objects within the expression.\n",
      " |      \n",
      " |      Parameters\n",
      " |      ==========\n",
      " |      \n",
      " |      rule : dict-like\n",
      " |          Expresses a replacement rule\n",
      " |      \n",
      " |      Returns\n",
      " |      =======\n",
      " |      \n",
      " |      xreplace : the result of the replacement\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import symbols, pi, exp\n",
      " |      >>> x, y, z = symbols('x y z')\n",
      " |      >>> (1 + x*y).xreplace({x: pi})\n",
      " |      pi*y + 1\n",
      " |      >>> (1 + x*y).xreplace({x: pi, y: 2})\n",
      " |      1 + 2*pi\n",
      " |      \n",
      " |      Replacements occur only if an entire node in the expression tree is\n",
      " |      matched:\n",
      " |      \n",
      " |      >>> (x*y + z).xreplace({x*y: pi})\n",
      " |      z + pi\n",
      " |      >>> (x*y*z).xreplace({x*y: pi})\n",
      " |      x*y*z\n",
      " |      >>> (2*x).xreplace({2*x: y, x: z})\n",
      " |      y\n",
      " |      >>> (2*2*x).xreplace({2*x: y, x: z})\n",
      " |      4*z\n",
      " |      >>> (x + y + 2).xreplace({x + y: 2})\n",
      " |      x + y + 2\n",
      " |      >>> (x + 2 + exp(x + 2)).xreplace({x + 2: y})\n",
      " |      x + exp(y) + 2\n",
      " |      \n",
      " |      xreplace does not differentiate between free and bound symbols. In the\n",
      " |      following, subs(x, y) would not change x since it is a bound symbol,\n",
      " |      but xreplace does:\n",
      " |      \n",
      " |      >>> from sympy import Integral\n",
      " |      >>> Integral(x, (x, 1, 2*x)).xreplace({x: y})\n",
      " |      Integral(y, (y, 1, 2*y))\n",
      " |      \n",
      " |      Trying to replace x with an expression raises an error:\n",
      " |      \n",
      " |      >>> Integral(x, (x, 1, 2*x)).xreplace({x: 2*y}) # doctest: +SKIP\n",
      " |      ValueError: Invalid limits given: ((2*y, 1, 4*y),)\n",
      " |      \n",
      " |      See Also\n",
      " |      ========\n",
      " |      replace: replacement capable of doing wildcard-like matching,\n",
      " |               parsing of match, and conditional replacements\n",
      " |      subs: substitution of subexpressions as defined by the objects\n",
      " |            themselves.\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Class methods inherited from sympy.core.basic.Basic:\n",
      " |  \n",
      " |  __init_subclass__() from builtins.type\n",
      " |      This method is called when a class is subclassed.\n",
      " |      \n",
      " |      The default implementation does nothing. It may be\n",
      " |      overridden to extend subclasses.\n",
      " |  \n",
      " |  class_key() from builtins.type\n",
      " |      Nice order of classes.\n",
      " |  \n",
      " |  fromiter(args, **assumptions) from builtins.type\n",
      " |      Create a new object from an iterable.\n",
      " |      \n",
      " |      This is a convenience function that allows one to create objects from\n",
      " |      any iterable, without having to convert to a list or tuple first.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Tuple\n",
      " |      >>> Tuple.fromiter(i for i in range(5))\n",
      " |      (0, 1, 2, 3, 4)\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Readonly properties inherited from sympy.core.basic.Basic:\n",
      " |  \n",
      " |  __sympy__\n",
      " |  \n",
      " |  args\n",
      " |      Returns a tuple of arguments of 'self'.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import cot\n",
      " |      >>> from sympy.abc import x, y\n",
      " |      \n",
      " |      >>> cot(x).args\n",
      " |      (x,)\n",
      " |      \n",
      " |      >>> cot(x).args[0]\n",
      " |      x\n",
      " |      \n",
      " |      >>> (x*y).args\n",
      " |      (x, y)\n",
      " |      \n",
      " |      >>> (x*y).args[1]\n",
      " |      y\n",
      " |      \n",
      " |      Notes\n",
      " |      =====\n",
      " |      \n",
      " |      Never use self._args, always use self.args.\n",
      " |      Only use _args in __new__ when creating a new function.\n",
      " |      Do not override .args() from Basic (so that it is easy to\n",
      " |      change the interface in the future if needed).\n",
      " |  \n",
      " |  assumptions0\n",
      " |      Return object `type` assumptions.\n",
      " |      \n",
      " |      For example:\n",
      " |      \n",
      " |        Symbol('x', real=True)\n",
      " |        Symbol('x', integer=True)\n",
      " |      \n",
      " |      are different objects. In other words, besides Python type (Symbol in\n",
      " |      this case), the initial assumptions are also forming their typeinfo.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Symbol\n",
      " |      >>> from sympy.abc import x\n",
      " |      >>> x.assumptions0\n",
      " |      {'commutative': True}\n",
      " |      >>> x = Symbol(\"x\", positive=True)\n",
      " |      >>> x.assumptions0\n",
      " |      {'commutative': True, 'complex': True, 'extended_negative': False,\n",
      " |       'extended_nonnegative': True, 'extended_nonpositive': False,\n",
      " |       'extended_nonzero': True, 'extended_positive': True, 'extended_real':\n",
      " |       True, 'finite': True, 'hermitian': True, 'imaginary': False,\n",
      " |       'infinite': False, 'negative': False, 'nonnegative': True,\n",
      " |       'nonpositive': False, 'nonzero': True, 'positive': True, 'real':\n",
      " |       True, 'zero': False}\n",
      " |  \n",
      " |  canonical_variables\n",
      " |      Return a dictionary mapping any variable defined in\n",
      " |      ``self.bound_symbols`` to Symbols that do not clash\n",
      " |      with any free symbols in the expression.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import Lambda\n",
      " |      >>> from sympy.abc import x\n",
      " |      >>> Lambda(x, 2*x).canonical_variables\n",
      " |      {x: _0}\n",
      " |  \n",
      " |  expr_free_symbols\n",
      " |  \n",
      " |  func\n",
      " |      The top-level function in an expression.\n",
      " |      \n",
      " |      The following should hold for all objects::\n",
      " |      \n",
      " |          >> x == x.func(*x.args)\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy.abc import x\n",
      " |      >>> a = 2*x\n",
      " |      >>> a.func\n",
      " |      <class 'sympy.core.mul.Mul'>\n",
      " |      >>> a.args\n",
      " |      (2, x)\n",
      " |      >>> a.func(*a.args)\n",
      " |      2*x\n",
      " |      >>> a == a.func(*a.args)\n",
      " |      True\n",
      " |  \n",
      " |  is_algebraic\n",
      " |  \n",
      " |  is_antihermitian\n",
      " |  \n",
      " |  is_comparable\n",
      " |      Return True if self can be computed to a real number\n",
      " |      (or already is a real number) with precision, else False.\n",
      " |      \n",
      " |      Examples\n",
      " |      ========\n",
      " |      \n",
      " |      >>> from sympy import exp_polar, pi, I\n",
      " |      >>> (I*exp_polar(I*pi/2)).is_comparable\n",
      " |      True\n",
      " |      >>> (I*exp_polar(I*pi*2)).is_comparable\n",
      " |      False\n",
      " |      \n",
      " |      A False result does not mean that `self` cannot be rewritten\n",
      " |      into a form that would be comparable. For example, the\n",
      " |      difference computed below is zero but without simplification\n",
      " |      it does not evaluate to a zero with precision:\n",
      " |      \n",
      " |      >>> e = 2**pi*(1 + 2**pi)\n",
      " |      >>> dif = e - e.expand()\n",
      " |      >>> dif.is_comparable\n",
      " |      False\n",
      " |      >>> dif.n(2)._prec\n",
      " |      1\n",
      " |  \n",
      " |  is_complex\n",
      " |  \n",
      " |  is_composite\n",
      " |  \n",
      " |  is_even\n",
      " |  \n",
      " |  is_extended_negative\n",
      " |  \n",
      " |  is_extended_nonnegative\n",
      " |  \n",
      " |  is_extended_nonpositive\n",
      " |  \n",
      " |  is_extended_nonzero\n",
      " |  \n",
      " |  is_extended_positive\n",
      " |  \n",
      " |  is_extended_real\n",
      " |  \n",
      " |  is_finite\n",
      " |  \n",
      " |  is_hermitian\n",
      " |  \n",
      " |  is_imaginary\n",
      " |  \n",
      " |  is_infinite\n",
      " |  \n",
      " |  is_integer\n",
      " |  \n",
      " |  is_irrational\n",
      " |  \n",
      " |  is_negative\n",
      " |  \n",
      " |  is_noninteger\n",
      " |  \n",
      " |  is_nonnegative\n",
      " |  \n",
      " |  is_nonpositive\n",
      " |  \n",
      " |  is_nonzero\n",
      " |  \n",
      " |  is_odd\n",
      " |  \n",
      " |  is_polar\n",
      " |  \n",
      " |  is_positive\n",
      " |  \n",
      " |  is_prime\n",
      " |  \n",
      " |  is_rational\n",
      " |  \n",
      " |  is_real\n",
      " |  \n",
      " |  is_transcendental\n",
      " |  \n",
      " |  is_zero\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Data and other attributes inherited from sympy.core.basic.Basic:\n",
      " |  \n",
      " |  __annotations__ = {'_args': 'tuple[Basic, ...]', '_mhash': 'int | None...\n",
      " |  \n",
      " |  is_Add = False\n",
      " |  \n",
      " |  is_AlgebraicNumber = False\n",
      " |  \n",
      " |  is_Atom = False\n",
      " |  \n",
      " |  is_Boolean = False\n",
      " |  \n",
      " |  is_Derivative = False\n",
      " |  \n",
      " |  is_Dummy = False\n",
      " |  \n",
      " |  is_Equality = False\n",
      " |  \n",
      " |  is_Float = False\n",
      " |  \n",
      " |  is_Function = False\n",
      " |  \n",
      " |  is_Indexed = False\n",
      " |  \n",
      " |  is_Integer = False\n",
      " |  \n",
      " |  is_MatAdd = False\n",
      " |  \n",
      " |  is_MatMul = False\n",
      " |  \n",
      " |  is_Matrix = False\n",
      " |  \n",
      " |  is_Mul = False\n",
      " |  \n",
      " |  is_Not = False\n",
      " |  \n",
      " |  is_Number = False\n",
      " |  \n",
      " |  is_NumberSymbol = False\n",
      " |  \n",
      " |  is_Order = False\n",
      " |  \n",
      " |  is_Piecewise = False\n",
      " |  \n",
      " |  is_Point = False\n",
      " |  \n",
      " |  is_Poly = False\n",
      " |  \n",
      " |  is_Pow = False\n",
      " |  \n",
      " |  is_Rational = False\n",
      " |  \n",
      " |  is_Relational = False\n",
      " |  \n",
      " |  is_Symbol = False\n",
      " |  \n",
      " |  is_Vector = False\n",
      " |  \n",
      " |  is_Wild = False\n",
      " |  \n",
      " |  is_number = False\n",
      " |  \n",
      " |  is_symbol = False\n",
      " |  \n",
      " |  kind = UndefinedKind\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Methods inherited from sympy.printing.defaults.Printable:\n",
      " |  \n",
      " |  __repr__ = __str__(self)\n",
      " |  \n",
      " |  __str__(self)\n",
      " |      Return str(self).\n",
      "\n"
     ]
    }
   ],
   "source": [
    "help(RecursiveSeq)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 170,
   "id": "928d3713",
   "metadata": {},
   "outputs": [],
   "source": [
    "sn=RecursiveSeq((s(n-1)-2)*n/(n-2),s(n),n,[2],1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 174,
   "id": "a91214e3",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\text{NaN}$"
      ],
      "text/plain": [
       "nan"
      ]
     },
     "execution_count": 174,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sn.coeff(3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 177,
   "id": "d4eec77f",
   "metadata": {},
   "outputs": [],
   "source": [
    "def checks(n):\n",
    "    if(n==1):\n",
    "        return 2\n",
    "    elif(n==2):\n",
    "        return x\n",
    "    else:\n",
    "        return (checks(n-1)-2)*n/(n-2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 178,
   "id": "d19c9610",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle 3 x - 6$"
      ],
      "text/plain": [
       "3*x - 6"
      ]
     },
     "execution_count": 178,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "checks(3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 180,
   "id": "9070b41a",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle 6 x - 16$"
      ],
      "text/plain": [
       "6*x - 16"
      ]
     },
     "execution_count": 180,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "checks(4)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 181,
   "id": "569eb05e",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle 10 x - 30$"
      ],
      "text/plain": [
       "10*x - 30"
      ]
     },
     "execution_count": 181,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "checks(5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 182,
   "id": "1f5a5daa",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle 15 x - 48$"
      ],
      "text/plain": [
       "15*x - 48"
      ]
     },
     "execution_count": 182,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "checks(6)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 185,
   "id": "44323a02",
   "metadata": {},
   "outputs": [],
   "source": [
    "\n",
    "a = symbols(\"a\",positive=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 186,
   "id": "4c21ea76",
   "metadata": {},
   "outputs": [],
   "source": [
    "expr=log(x,a)+x**2/2-(1+1/ln(a))*x"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 187,
   "id": "c039cb6b",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\frac{x^{2}}{2} - x \\left(1 + \\frac{1}{\\log{\\left(a \\right)}}\\right) + \\frac{\\log{\\left(x \\right)}}{\\log{\\left(a \\right)}}$"
      ],
      "text/plain": [
       "x**2/2 - x*(1 + 1/log(a)) + log(x)/log(a)"
      ]
     },
     "execution_count": 187,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "expr"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 191,
   "id": "57dfe34a",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle y = - \\frac{1}{2} - \\frac{1}{\\log{\\left(a \\right)}}$"
      ],
      "text/plain": [
       "Eq(y, -1/2 - 1/log(a))"
      ]
     },
     "execution_count": 191,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "function_tangent(expr,x,1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 192,
   "id": "40dee59a",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle x - 1 - \\frac{1}{\\log{\\left(a \\right)}} + \\frac{1}{x \\log{\\left(a \\right)}}$"
      ],
      "text/plain": [
       "x - 1 - 1/log(a) + 1/(x*log(a))"
      ]
     },
     "execution_count": 192,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "diff(expr,x)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 194,
   "id": "c4915d0d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\frac{\\left(x - 1\\right) \\left(x \\log{\\left(a \\right)} - 1\\right)}{x \\log{\\left(a \\right)}}$"
      ],
      "text/plain": [
       "(x - 1)*(x*log(a) - 1)/(x*log(a))"
      ]
     },
     "execution_count": 194,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "factor(diff(expr,x))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 193,
   "id": "145757dd",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left[0, \\infty\\right)$"
      ],
      "text/plain": [
       "Interval(0, oo)"
      ]
     },
     "execution_count": 193,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "solveset(1+x>=2*sqrt(x),x,Reals)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 196,
   "id": "f5b0adc4",
   "metadata": {},
   "outputs": [],
   "source": [
    "from sympy.stats import Geometric"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 201,
   "id": "7b2f4f86",
   "metadata": {},
   "outputs": [],
   "source": [
    "Y=Geometric(\"Y\",S(1)/3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 202,
   "id": "934e70bf",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle 3$"
      ],
      "text/plain": [
       "3"
      ]
     },
     "execution_count": 202,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "E(Y)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 285,
   "id": "4eacf45e",
   "metadata": {},
   "outputs": [],
   "source": [
    "from sympy.abc import x,y"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 288,
   "id": "641ce7cd",
   "metadata": {},
   "outputs": [],
   "source": [
    "p=symbols(\"p\",positive=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 257,
   "id": "b8632884",
   "metadata": {},
   "outputs": [],
   "source": [
    "p=2"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 289,
   "id": "450410bc",
   "metadata": {},
   "outputs": [],
   "source": [
    "para=Parabola(Point(p/2,0),Line(x+p/2))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 290,
   "id": "7409097d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle 2 p x - y^{2}$"
      ],
      "text/plain": [
       "2*p*x - y**2"
      ]
     },
     "execution_count": 290,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "para.equation()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 291,
   "id": "eeb3ff57",
   "metadata": {},
   "outputs": [],
   "source": [
    "l=Line(y-sqrt(3)*(x-p/2))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 292,
   "id": "ef72b5ee",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\frac{\\sqrt{3} p}{2} - \\sqrt{3} x + y$"
      ],
      "text/plain": [
       "sqrt(3)*p/2 - sqrt(3)*x + y"
      ]
     },
     "execution_count": 292,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "l.equation()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 262,
   "id": "c5038618",
   "metadata": {},
   "outputs": [],
   "source": [
    "A,D=Intersection(l,para)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 263,
   "id": "40e256b4",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\operatorname{Point2D}\\left(\\frac{1}{3}, - \\frac{2 \\sqrt{3}}{3}\\right)$"
      ],
      "text/plain": [
       "Point2D(1/3, -2*sqrt(3)/3)"
      ]
     },
     "execution_count": 263,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 264,
   "id": "0e00c5fc",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\operatorname{Point2D}\\left(3, 2 \\sqrt{3}\\right)$"
      ],
      "text/plain": [
       "Point2D(3, 2*sqrt(3))"
      ]
     },
     "execution_count": 264,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "D"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 265,
   "id": "a4a4251c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\frac{16}{3}$"
      ],
      "text/plain": [
       "16/3"
      ]
     },
     "execution_count": 265,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "A.distance(D)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 296,
   "id": "f36478db",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle - 3 p^{2} - 2 \\sqrt{3} p y + 3 y^{2}$"
      ],
      "text/plain": [
       "-3*p**2 - 2*sqrt(3)*p*y + 3*y**2"
      ]
     },
     "execution_count": 296,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "line_and_quadratic(l,para,y=y,first=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 298,
   "id": "f94173d9",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left\\{- \\frac{\\sqrt{3} p}{3}, \\sqrt{3} p\\right\\}$"
      ],
      "text/plain": [
       "{-sqrt(3)*p/3, sqrt(3)*p}"
      ]
     },
     "execution_count": 298,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "solveset(_,y)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 267,
   "id": "11a66286",
   "metadata": {},
   "outputs": [],
   "source": [
    "F=Point(p/2,0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 268,
   "id": "a3fa14b3",
   "metadata": {},
   "outputs": [],
   "source": [
    "c=Circle(F,1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 269,
   "id": "ca903f3c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle y^{2} + \\left(x - 1\\right)^{2} - 1$"
      ],
      "text/plain": [
       "y**2 + (x - 1)**2 - 1"
      ]
     },
     "execution_count": 269,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "c.equation()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 270,
   "id": "c3b85c5e",
   "metadata": {},
   "outputs": [],
   "source": [
    "x0, x1, x2=symbols(\"x0:3\",real=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 271,
   "id": "6a1870e2",
   "metadata": {},
   "outputs": [],
   "source": [
    "y0, y1, y2=symbols(\"y0:3\",real=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 272,
   "id": "43c0ceec",
   "metadata": {},
   "outputs": [],
   "source": [
    "T=Point(x0,y0)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 273,
   "id": "598ac414",
   "metadata": {},
   "outputs": [],
   "source": [
    "l1,l2=c.tangent_lines(T)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 299,
   "id": "9ab1a2c7",
   "metadata": {},
   "outputs": [],
   "source": [
    "expr=4*x**3/(3*(16*x**2-1))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 300,
   "id": "77efa2f5",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\frac{4 x^{3}}{48 x^{2} - 3}$"
      ],
      "text/plain": [
       "4*x**3/(48*x**2 - 3)"
      ]
     },
     "execution_count": 300,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "expr"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 302,
   "id": "20fdde5a",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\frac{4 x^{2} \\cdot \\left(16 x^{2} - 3\\right)}{3 \\left(4 x - 1\\right)^{2} \\left(4 x + 1\\right)^{2}}$"
      ],
      "text/plain": [
       "4*x**2*(16*x**2 - 3)/(3*(4*x - 1)**2*(4*x + 1)**2)"
      ]
     },
     "execution_count": 302,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "factor(diff(expr,x))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 303,
   "id": "2c006ae6",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\frac{\\sqrt{3}}{32}$"
      ],
      "text/plain": [
       "sqrt(3)/32"
      ]
     },
     "execution_count": 303,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "expr.subs(x,sqrt(3)/4)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 311,
   "id": "af478874",
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Help on method tangent_lines in module sympy.geometry.ellipse:\n",
      "\n",
      "tangent_lines(p) method of sympy.geometry.ellipse.Circle instance\n",
      "    Tangent lines between `p` and the ellipse.\n",
      "    \n",
      "    If `p` is on the ellipse, returns the tangent line through point `p`.\n",
      "    Otherwise, returns the tangent line(s) from `p` to the ellipse, or\n",
      "    None if no tangent line is possible (e.g., `p` inside ellipse).\n",
      "    \n",
      "    Parameters\n",
      "    ==========\n",
      "    \n",
      "    p : Point\n",
      "    \n",
      "    Returns\n",
      "    =======\n",
      "    \n",
      "    tangent_lines : list with 1 or 2 Lines\n",
      "    \n",
      "    Raises\n",
      "    ======\n",
      "    \n",
      "    NotImplementedError\n",
      "        Can only find tangent lines for a point, `p`, on the ellipse.\n",
      "    \n",
      "    See Also\n",
      "    ========\n",
      "    \n",
      "    sympy.geometry.point.Point, sympy.geometry.line.Line\n",
      "    \n",
      "    Examples\n",
      "    ========\n",
      "    \n",
      "    >>> from sympy import Point, Ellipse\n",
      "    >>> e1 = Ellipse(Point(0, 0), 3, 2)\n",
      "    >>> e1.tangent_lines(Point(3, 0))\n",
      "    [Line2D(Point2D(3, 0), Point2D(3, -12))]\n",
      "\n"
     ]
    }
   ],
   "source": [
    "help(c.tangent_lines)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 312,
   "id": "95fd4e10",
   "metadata": {
    "collapsed": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Help on function solve_complex in module basic_package.utils:\n",
      "\n",
      "solve_complex(expr, z) -> list\n",
      "    It will change the complex univariate to `a+b*I`,then solve the functions to solve the complex function.\n",
      "\n"
     ]
    }
   ],
   "source": [
    "help(solve_complex)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 313,
   "id": "60dd6ba4",
   "metadata": {},
   "outputs": [],
   "source": [
    "eq=Eq(z**2-conjugate(z),3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 318,
   "id": "5e8a8a40",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "sympy.core.relational.Equality"
      ]
     },
     "execution_count": 318,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "type(eq)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 364,
   "id": "fe9315df",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left\\{\\frac{1}{2} - \\frac{\\sqrt{13}}{2}, \\frac{1}{2} + \\frac{\\sqrt{13}}{2}\\right\\}$"
      ],
      "text/plain": [
       "{1/2 - sqrt(13)/2, 1/2 + sqrt(13)/2}"
      ]
     },
     "execution_count": 364,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "solve_complex(eq,z)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 354,
   "id": "249b447d",
   "metadata": {},
   "outputs": [],
   "source": [
    "a,b=symbols(\"a,b\",real=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 355,
   "id": "a14d6acd",
   "metadata": {},
   "outputs": [],
   "source": [
    "dic={z:a+b*I,conjugate(z):a-b*I}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 356,
   "id": "d18f88b0",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{z: a + I*b, conjugate(z): a - I*b}"
      ]
     },
     "execution_count": 356,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "dic"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 357,
   "id": "36e07391",
   "metadata": {},
   "outputs": [],
   "source": [
    "expr=eq.lhs-eq.rhs"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 361,
   "id": "a1f8fa2c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle - a + i b + \\left(a + i b\\right)^{2} - 3$"
      ],
      "text/plain": [
       "-a + I*b + (a + I*b)**2 - 3"
      ]
     },
     "execution_count": 361,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "expr.subs(dic)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 362,
   "id": "7bb4b9c8",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(a**2 - a - b**2 - 3, 2*a*b + b)"
      ]
     },
     "execution_count": 362,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "_.as_real_imag()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 363,
   "id": "c8451ce9",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\left\\{\\left( - \\frac{1}{2}, \\  - \\frac{3 i}{2}\\right), \\left( - \\frac{1}{2}, \\  \\frac{3 i}{2}\\right), \\left( \\frac{1}{2} - \\frac{\\sqrt{13}}{2}, \\  0\\right), \\left( \\frac{1}{2} + \\frac{\\sqrt{13}}{2}, \\  0\\right)\\right\\}$"
      ],
      "text/plain": [
       "{(-1/2, -3*I/2), (-1/2, 3*I/2), (1/2 - sqrt(13)/2, 0), (1/2 + sqrt(13)/2, 0)}"
      ]
     },
     "execution_count": 363,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "nonlinsolve(_,[a,b],Reals)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "6ca7c6c2",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.16"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
